<?php

namespace app\validate;

use think\Validate;

class Mall extends Validate
{
    protected $rule = [
        'goods_id|商品ID'   => 'require|number',
        'id|ID'           => 'require|number',
        'address_id|地址ID' => 'require|number',
        'pay_type|支付方式'   => 'in:balance,wechat,alipay',
    ];

    protected $scene = [
        'purchase'              => ['goods_id', 'address_id'],//购物车提交
        'auction_mark_purchase' => ['id', 'address_id'],//中标单提交
    ];
}