1
0

TenantRegisterValidate.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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\tenant;
  15. use app\common\validate\BaseValidate;
  16. /**
  17. * TenantRegister验证器
  18. * Class TenantRegisterValidate
  19. * @package app\adminapi\validate
  20. */
  21. class TenantRegisterValidate extends BaseValidate
  22. {
  23. /**
  24. * 设置校验规则
  25. * @var string[]
  26. */
  27. protected $rule = [
  28. 'id' => 'require',
  29. 'name' => 'require',
  30. 'head_name' => 'require',
  31. 'mobile' => 'require',
  32. 'city' => 'require',
  33. 'lon' => 'require',
  34. 'lat' => 'require',
  35. 'sale_id' => 'require',
  36. 'openid' => 'require',
  37. ];
  38. /**
  39. * 参数描述
  40. * @var string[]
  41. */
  42. protected $field = [
  43. 'id' => 'id',
  44. 'name' => '门店名称',
  45. 'head_name' => '负责人名称',
  46. 'mobile' => '电话',
  47. 'city' => '城市',
  48. 'lon' => '经度',
  49. 'lat' => '维度',
  50. 'sale_id' => '所属销售id',
  51. 'openid' => '微信openid',
  52. ];
  53. /**
  54. * @notes 添加场景
  55. * @return TenantRegisterValidate
  56. * @author likeadmin
  57. * @date 2025/02/25 09:29
  58. */
  59. public function sceneAdd()
  60. {
  61. return $this->only(['name','head_name','mobile','city','lon','lat','sale_id']);
  62. }
  63. /**
  64. * @notes 编辑场景
  65. * @return TenantRegisterValidate
  66. * @author likeadmin
  67. * @date 2025/02/25 09:29
  68. */
  69. public function sceneEdit()
  70. {
  71. return $this->only(['id','name','head_name','mobile','city','lon','lat','sale_id']);
  72. }
  73. /**
  74. * @notes 删除场景
  75. * @return TenantRegisterValidate
  76. * @author likeadmin
  77. * @date 2025/02/25 09:29
  78. */
  79. public function sceneDelete()
  80. {
  81. return $this->only(['id']);
  82. }
  83. /**
  84. * @notes 详情场景
  85. * @return TenantRegisterValidate
  86. * @author likeadmin
  87. * @date 2025/02/25 09:29
  88. */
  89. public function sceneDetail()
  90. {
  91. return $this->only(['id']);
  92. }
  93. }