GroupOrderValidate.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace app\api\validate;
  3. use app\common\validate\BaseValidate;
  4. /**
  5. * 拼团订单验证器
  6. * Class GroupOrderValidate
  7. * @package app\api\validate
  8. */
  9. class GroupOrderValidate extends BaseValidate
  10. {
  11. protected $rule = [
  12. 'order_id'=>'require',
  13. 'pay_way' => 'require',
  14. 'group_activity_id' => 'require',
  15. 'area' => 'require',
  16. 'address' =>'require',
  17. ];
  18. protected $field = [
  19. 'order_id' => '订单ID',
  20. 'pay_way' => '支付方式',
  21. 'group_activity_id' => '拼团活动ID',
  22. 'area' => '小区',
  23. 'address' => '详细地址',
  24. ];
  25. public function sceneAdd()
  26. {
  27. return $this->only(['pay_way','group_activity_id','remark','area','address']);
  28. }
  29. public function sceneDetail()
  30. {
  31. return $this->only(['order_id']);
  32. }
  33. public function sceneCancel()
  34. {
  35. return $this->only(['order_id']);
  36. }
  37. /**
  38. * @notes 支付方式场景
  39. * @return ShopPayValidate
  40. */
  41. public function scenePay()
  42. {
  43. return $this->only(['pay_way' ,'order_id']);
  44. }
  45. public function sceneRefund()
  46. {
  47. return $this->only(['order_id']);
  48. }
  49. public function sceneStatus()
  50. {
  51. return $this->only(['order_id']);
  52. }
  53. public function sceneQrcode()
  54. {
  55. return $this->only(['id','order_id','category_id']);
  56. }
  57. }