<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\dice\validate\lottery_config;

use plugin\saiadmin\basic\BaseValidate;

/**
 * 色子奖池配置验证器
 */
class DiceLotteryConfigValidate extends BaseValidate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'name' => 'require',
        'type' => 'require',
        't1_wight' => 'require',
        't2_wight' => 'require',
        't3_wight' => 'require',
        't4_wight' => 'require',
        't5_wight' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'name' => '名称必须填写',
        'type' => '奖池类型必须填写',
        't1_wight' => 'T1池权重必须填写',
        't2_wight' => 'T2池权重必须填写',
        't3_wight' => 'T3池权重必须填写',
        't4_wight' => 'T4池权重必须填写',
        't5_wight' => 'T5池权重必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'name',
            'type',
            't1_wight',
            't2_wight',
            't3_wight',
            't4_wight',
            't5_wight',
        ],
        'update' => [
            'name',
            'type',
            't1_wight',
            't2_wight',
            't3_wight',
            't4_wight',
            't5_wight',
        ],
    ];

}
