| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- namespace app\api\validate;
- use app\common\validate\BaseValidate;
- /**
- * 拼团订单验证器
- * Class GroupOrderValidate
- * @package app\api\validate
- */
- class GroupOrderValidate extends BaseValidate
- {
- protected $rule = [
- 'id'=>'require',
- 'order_id'=>'require',
- 'pay_way' => 'require',
- 'group_activity_id' => 'require',
- 'area' => 'require',
- 'address' =>'require',
- 'category_id' => 'require',
- ];
- protected $field = [
- 'id' => '活动ID',
- 'order_id' => '订单ID',
- 'pay_way' => '支付方式',
- 'group_activity_id' => '拼团活动ID',
- 'area' => '小区',
- 'address' => '详细地址',
- 'category_id' => '分类ID',
- ];
- public function sceneAdd()
- {
- return $this->only(['pay_way','group_activity_id','remark','area','address']);
- }
- public function sceneDetail()
- {
- return $this->only(['order_id']);
- }
- public function sceneCancel()
- {
- return $this->only(['order_id']);
- }
- /**
- * @notes 支付方式场景
- * @return ShopPayValidate
- */
- public function scenePay()
- {
- return $this->only(['pay_way' ,'order_id']);
- }
- public function sceneRefund()
- {
- return $this->only(['order_id']);
- }
- public function sceneStatus()
- {
- return $this->only(['order_id']);
- }
- public function sceneQrcode()
- {
- return $this->only(['id','order_id','category_id']);
- }
- }
|