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

use plugin\saiadmin\basic\BaseValidate;

/**
 * 色子奖池配置验证器
 */
class DiceLotteryPoolConfigValidate extends BaseValidate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'name' => 'require',
        'remark' => 'max:200',
        'config_note' => 'max:500',
        't1_weight' => 'require',
        't2_weight' => 'require',
        't3_weight' => 'require',
        't4_weight' => 'require',
        't5_weight' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'name' => '名称必须填写',
        't1_weight' => 'T1池权重必须填写',
        't2_weight' => 'T2池权重必须填写',
        't3_weight' => 'T3池权重必须填写',
        't4_weight' => 'T4池权重必须填写',
        't5_weight' => 'T5池权重必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'name',
            'remark',
            'config_note',
            't1_weight',
            't2_weight',
            't3_weight',
            't4_weight',
            't5_weight',
        ],
        'update' => [
            'name',
            'remark',
            'config_note',
            't1_weight',
            't2_weight',
            't3_weight',
            't4_weight',
            't5_weight',
        ],
    ];

}
