<?php

namespace app\admin\validate\coupon;

use support\Validate;

class CouponValidate extends Validate
{
    /**
     * 规则
     * @var string[]
     */
    protected $rule = [
        'coupon_id' => 'require|alphaDash',
//        'coupon_status|优惠券状态' => 'require|in:ACTIVED,DISABLED',
        'coupon_category|分类' => 'max:32',
        'coupon_name|名称' => 'require|max:32',
//        'coupon_validdate_begin|启用日期' => 'require',
//        'coupon_validdate_end|过期时间' => 'require',
    ];

    /**
     * 场景
     * @var array[]
     */
    protected $scene = [
        'add' => ['coupon_category', 'coupon_name'],
        'update' => ['coupon_id', 'coupon_category', 'coupon_name'],
    ];
}