|
|
@ -0,0 +1,58 @@ |
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1); |
|
|
|
|
|
|
|
|
|
|
|
namespace App\Request; |
|
|
|
|
|
|
|
|
|
|
|
use App\Request\BaseFormRequest; |
|
|
|
|
|
|
|
|
|
|
|
class WxminiPayRequest extends BaseFormRequest |
|
|
|
|
|
{ |
|
|
|
|
|
/** |
|
|
|
|
|
* Get the validation rules that apply to the request. |
|
|
|
|
|
*/ |
|
|
|
|
|
public function rules(): array |
|
|
|
|
|
{ |
|
|
|
|
|
return [ |
|
|
|
|
|
'c_attitude' => 'required|nonempty|integer', |
|
|
|
|
|
'c_service' => 'required|nonempty|integer', |
|
|
|
|
|
'c_quality' => 'required|nonempty|integer', |
|
|
|
|
|
'content' => 'required|nonempty|strlen:15,150', |
|
|
|
|
|
'user_id' => 'required|nonempty|integer|exists:ims_cjdc_user,id', |
|
|
|
|
|
'service_personnel_id' => 'required|nonempty|integer|exists_enable:lanzu_service_personnel,id,status=1|not_equal:user_id,lanzu_service_personnel,id,user_id', |
|
|
|
|
|
'market_id' => 'required|nonempty|integer|exists:ims_cjdc_market,id', |
|
|
|
|
|
]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function messages(): array |
|
|
|
|
|
{ |
|
|
|
|
|
return [ |
|
|
|
|
|
'user_id.exists' => ':attribute不存在', |
|
|
|
|
|
'service_personnel_id.exists' => ':attribute不存在', |
|
|
|
|
|
'market_id.exists' => ':attribute不存在', |
|
|
|
|
|
'user_id.*' => ':attribute信息不正确', |
|
|
|
|
|
'service_personnel_id.exists_enable' => ':attribute不存在或被禁用', |
|
|
|
|
|
'service_personnel_id.not_equal' => ':attribute不能是自己', |
|
|
|
|
|
'service_personnel_id.*' => ':attribute信息不正确', |
|
|
|
|
|
'market_id.*' => ':attribute信息不正确', |
|
|
|
|
|
'c_attitude.*' => ':attribute信息不正确', |
|
|
|
|
|
'c_service.*' => ':attribute信息不正确', |
|
|
|
|
|
'c_quality.*' => ':attribute信息不正确', |
|
|
|
|
|
'content.strlen' => ':attribute字数限制在:min~:max字', |
|
|
|
|
|
'content.*' => ':attribute信息不正确', |
|
|
|
|
|
]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function attributes(): array |
|
|
|
|
|
{ |
|
|
|
|
|
return [ |
|
|
|
|
|
'user_id' => '用户', |
|
|
|
|
|
'service_personnel_id' => '服务专员', |
|
|
|
|
|
'market_id' => '服务专员市场', |
|
|
|
|
|
'c_attitude' => '服务态度评分', |
|
|
|
|
|
'c_service' => '服务值评分', |
|
|
|
|
|
'c_quality' => '服务质量评分', |
|
|
|
|
|
'content' => '服务评价内容', |
|
|
|
|
|
]; |
|
|
|
|
|
} |
|
|
|
|
|
} |