<?php
namespace app\api\validate;
use app\common\validate\BaseValidate;

/**
 * @author 林海涛
 * @date 2024/7/18 下午4:39
 */
class UserCouponValidate extends BaseValidate {
    protected $rule = [
        'codes' => 'require',
        'goods_category_id'=> 'require',
        'voucher_status'=>'require',
        'amount' =>'require',
    ];
    protected $field = [
        'codes' => '优惠券编码组',
        'goods_category_id'=>'分类ID',
        'voucher_status'=>'参数',
        'amount' => '金额',
    ];
    public function sceneAdd()
    {
        return $this->only(['code']);
    }

    public function sceneVoucher()
    {
        return $this->only(['voucher_status']);
    }

    public function sceneCategory()
    {
        return $this->only(['goods_category_id']);
    }

    public function sceneCategoryWithAmountList()
    {
        return $this->only(['goods_category_id','amount']);
    }
}