IssueWorkValidate.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace app\workerapi\validate;
  3. use app\common\validate\BaseValidate;
  4. /**
  5. * IssueWork验证器
  6. * Class IssueWorkValidate
  7. * @package app\workerapi\validate\works
  8. */
  9. class IssueWorkValidate extends BaseValidate
  10. {
  11. /**
  12. * 设置校验规则
  13. * @var string[]
  14. */
  15. protected $rule = [
  16. 'id' => 'require',
  17. 'work_sn' => 'require',
  18. 'master_worker_id' => 'require',
  19. 'issue_approval' => 'require',
  20. 'responsible' => 'require',
  21. 'complaint_details' => 'require',
  22. 'appeal_info' => 'require',
  23. ];
  24. /**
  25. * 参数描述
  26. * @var string[]
  27. */
  28. protected $field = [
  29. 'id' => 'id',
  30. 'work_sn' => '工单编号',
  31. 'master_worker_id' => '工程师',
  32. 'issue_approval' => '投诉审核状态',
  33. 'responsible' => '定责',
  34. 'complaint_details' => '投诉详情',
  35. 'appeal_info' => '申述详情',
  36. ];
  37. /**
  38. * @notes 详情场景
  39. * @return IssueWorkValidate
  40. * @author whitef
  41. * @date 2024/07/10 15:06
  42. */
  43. public function sceneDetail()
  44. {
  45. return $this->only(['id']);
  46. }
  47. /**
  48. * @notes 详情场景
  49. * @return IssueWorkValidate
  50. * @author whitef
  51. * @date 2024/07/10 15:06
  52. */
  53. public function sceneApproval()
  54. {
  55. return $this->only(['id','appeal_info']);
  56. }
  57. }