CashOutConfig.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\validate\shop;
  12. use think\Validate;
  13. /**
  14. * 提现设置验证类
  15. */
  16. class CashOutConfig extends Validate
  17. {
  18. protected $rule = [
  19. 'is_open' => 'in:0,1', //是否开启
  20. 'min' => 'min:0', //最低提现金额
  21. 'rate' => 'between:0,100', //提现手续费比率
  22. 'is_auto_verify' => 'in:0,1', //是否自动审核
  23. 'is_auto_transfer' => 'in:0,1', //是否自动转账
  24. 'transfer_type' => 'require',
  25. ];
  26. protected $message = [
  27. 'is_open.in' => 'validate_shop_cashout_config.cash_out_is_open_in',
  28. 'min.min' => 'validate_shop_cashout_config.cash_out_min_min',
  29. 'rate.between' => 'validate_shop_cashout_config.cash_out_rate_between',
  30. 'is_auto_verify.in' => 'validate_shop_cashout_config.cash_out_is_auto_verify_in',
  31. 'is_auto_transfer.in' => 'validate_shop_cashout_config.cash_out_is_auto_transfer_in',
  32. 'transfer_type.require' => 'validate_shop_cashout_config.transfer_type_require',
  33. ];
  34. protected $scene = [
  35. 'set' => ['is_open', 'min', 'rate', 'is_auto_verify', 'is_auto_transfer', 'transfer_type'],
  36. ];
  37. }