1
0

MasterWorkerCaseOutLogValidate.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\adminapi\validate\finance;
  15. use app\common\validate\BaseValidate;
  16. /**
  17. * MasterWorkerCaseOutLog验证器
  18. * Class MasterWorkerCaseOutLogValidate
  19. * @package app\adminapi\validate\finance
  20. */
  21. class MasterWorkerCaseOutLogValidate extends BaseValidate
  22. {
  23. /**
  24. * 设置校验规则
  25. * @var string[]
  26. */
  27. protected $rule = [
  28. 'id' => 'require',
  29. 'sn' => 'require',
  30. 'worker_id' => 'require',
  31. 'action' => 'require',
  32. 'change_amount' => 'require',
  33. 'review_status' => 'require',
  34. ];
  35. /**
  36. * 参数描述
  37. * @var string[]
  38. */
  39. protected $field = [
  40. 'id' => 'id',
  41. 'sn' => 'sn',
  42. 'worker_id' => '用户id',
  43. 'change_amount' => '变动数量',
  44. 'review_status' => '审批状态',
  45. ];
  46. /**
  47. * @notes 添加场景
  48. * @return MasterWorkerCaseOutLogValidate
  49. * @author likeadmin
  50. * @date 2024/07/23 09:30
  51. */
  52. public function sceneAdd()
  53. {
  54. return $this->only(['worker_id','change_amount']);
  55. }
  56. /**
  57. * @notes 编辑场景
  58. * @return MasterWorkerCaseOutLogValidate
  59. * @author likeadmin
  60. * @date 2024/07/23 09:30
  61. */
  62. public function sceneEdit()
  63. {
  64. return $this->only(['sn','review_status']);
  65. }
  66. /**
  67. * @notes 删除场景
  68. * @return MasterWorkerCaseOutLogValidate
  69. * @author likeadmin
  70. * @date 2024/07/23 09:30
  71. */
  72. public function sceneDelete()
  73. {
  74. return $this->only(['id']);
  75. }
  76. /**
  77. * @notes 详情场景
  78. * @return MasterWorkerCaseOutLogValidate
  79. * @author likeadmin
  80. * @date 2024/07/23 09:30
  81. */
  82. public function sceneDetail()
  83. {
  84. return $this->only(['id']);
  85. }
  86. }