| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace app\workerapi\validate;
- use app\common\validate\BaseValidate;
- /**
- * GroupServiceWork验证器
- * Class GroupServiceWorkValidate
- * @package app\workerapi\validate\works
- */
- class GroupServiceWorkValidate extends BaseValidate
- {
- /**
- * 设置校验规则
- * @var string[]
- */
- protected $rule = [
- 'id' => 'require',
- 'work_sn' => 'require',
- 'mobile' => 'require',
- 'address' => 'require',
- 'work_status' => 'require',
- 'service_status' => 'require',
- 'appointment_time' => 'require|dateFormat:Y/m/d H:i:s',
- 'finished_images'=>'require',
- 'work_images'=>'require',
- 'code' => 'require',
- 'remark' => 'require',
- ];
- /**
- * 参数描述
- * @var string[]
- */
- protected $field = [
- 'id' => 'id',
- 'work_sn' => '工单编号',
- 'mobile' => '手机号',
- 'address' => '客户地址',
- 'work_status' => '工单状态',
- 'service_status' => '订单服务状态',
- 'appointment_time' => '预约上门时间',
- 'finished_time' => '结单时间',
- 'finished_images'=>'完结服务拍照',
- 'work_images'=>'工作拍照',
- 'code' => '工单验证码',
- 'remark' => '备注',
- ];
- /**
- * 领取场景
- * @return ServiceWorkValidate
- */
- public function sceneDetail()
- {
- return $this->only(['*']);
- }
- /**
- * 确认上门场景
- * @return ServiceWorkValidate
- */
- public function sceneDoor()
- {
- return $this->only(['work_sn','work_images']);
- }
- public function sceneFinished()
- {
- return $this->only(['work_sn','finished_images','code']);
- }
- public function sceneAgainDoor()
- {
- return $this->only(['work_sn','appointment_time']);
- }
- public function sceneRemark()
- {
- return $this->only(['work_sn','remark']);
- }
- }
|