OrderValidate.php 900 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\admin\validate\order;
  3. use support\Validate;
  4. class OrderValidate extends Validate
  5. {
  6. /**
  7. * 规则
  8. * @var string[]
  9. */
  10. protected $rule = [
  11. 'order_id' => 'require|alphaDash',
  12. 'join_order_member_id' => 'require|alphaDash',
  13. 'order_name|订单名称' => 'max:32',
  14. 'order_status_system|订单系统状态' => 'require|max:32',
  15. 'order_status_payment|订单支付状态' => 'require|max:32',
  16. 'order_status_storage|订单库存状态' => 'require|max:32',
  17. ];
  18. /**
  19. * 场景
  20. * @var array[]
  21. */
  22. protected $scene = [
  23. 'add' => ['join_order_member_id', 'order_name', 'order_status_system', 'order_status_payment', 'order_status_storage'],
  24. 'update' => ['order_id', 'join_order_member_id', 'order_name', 'order_status_system', 'order_status_payment', 'order_status_storage'],
  25. ];
  26. }