<?php
namespace app\workerapi\validate\shops;

use app\common\enum\PayEnum;
use app\common\validate\BaseValidate;

/**
 * 支付验证
 * Class ShopPayValidate
 */
class ShopPayValidate extends BaseValidate
{
    protected $rule = [
        'pay_way'   => 'require|in:' . PayEnum::BALANCE_PAY . ',' . PayEnum::WECHAT_PAY . ',' . PayEnum::ALI_PAY,
        'order_id'  => 'require'
    ];


    protected $message = [
        'pay_way.require'   => '支付方式参数缺失',
        'pay_way.in'        => '支付方式参数错误',
        'order_id.require'  => '订单参数缺失'
    ];

    /**
     * @notes 支付方式场景
     * @return ShopPayValidate
     */
    public function scenePay()
    {
        return $this->only(['pay_way' ,'order_id']);
    }

}