1
0

BankAccountValidate.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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\master_worker;
  15. use app\common\validate\BaseValidate;
  16. /**
  17. * BankAccount验证器
  18. * Class BankAccountValidate
  19. * @package app\adminapi\validate\master_worker
  20. */
  21. class BankAccountValidate extends BaseValidate
  22. {
  23. /**
  24. * 设置校验规则
  25. * @var string[]
  26. */
  27. protected $rule = [
  28. 'id' => 'require',
  29. 'account_holder' => 'require',
  30. 'bank_name' => 'require',
  31. 'province' => 'require',
  32. 'city' => 'require',
  33. 'opening_branch' => 'require',
  34. 'account' => 'require',
  35. 'mobile' => 'require',
  36. 'worker_id' => 'require',
  37. 'audit_state' => 'require',
  38. ];
  39. /**
  40. * 参数描述
  41. * @var string[]
  42. */
  43. protected $field = [
  44. 'id' => 'id',
  45. 'account_holder' => '户主名称',
  46. 'bank_name' => '银行名称',
  47. 'province' => '省',
  48. 'city' => '市',
  49. 'opening_branch' => '开户支行名称',
  50. 'account' => '银行卡账号',
  51. 'mobile' => '预留电话',
  52. 'worker_id' => '关联师傅ID',
  53. 'audit_state' => '审核状态',
  54. ];
  55. /**
  56. * @notes 添加场景
  57. * @return BankAccountValidate
  58. * @author likeadmin
  59. * @date 2024/10/08 09:41
  60. */
  61. public function sceneAdd()
  62. {
  63. return $this->only(['account_holder','bank_name','province','city','opening_branch','account','mobile','worker_id','audit_state']);
  64. }
  65. /**
  66. * @notes 编辑场景
  67. * @return BankAccountValidate
  68. * @author likeadmin
  69. * @date 2024/10/08 09:41
  70. */
  71. public function sceneEdit()
  72. {
  73. return $this->only(['id','account_holder','bank_name','province','city','opening_branch','account','mobile','worker_id','audit_state']);
  74. }
  75. /**
  76. * @notes 删除场景
  77. * @return BankAccountValidate
  78. * @author likeadmin
  79. * @date 2024/10/08 09:41
  80. */
  81. public function sceneDelete()
  82. {
  83. return $this->only(['id']);
  84. }
  85. /**
  86. * @notes 详情场景
  87. * @return BankAccountValidate
  88. * @author likeadmin
  89. * @date 2024/10/08 09:41
  90. */
  91. public function sceneDetail()
  92. {
  93. return $this->only(['id']);
  94. }
  95. }