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

use plugin\saiadmin\basic\BaseValidate;

/**
 * 玩家抽奖记录(测试数据)验证器
 */
class DicePlayRecordTestValidate extends BaseValidate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'lottery_config_id' => 'require',
        'lottery_type' => 'require',
        'is_win' => 'require',
        'direction' => 'require',
        'reward_tier' => 'require',
        'status' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'lottery_config_id' => '彩金池配置id必须填写',
        'lottery_type' => '抽奖类型:0=付费,1=免费必须填写',
        'is_win' => '中大奖:0=无,1=中奖必须填写',
        'direction' => '方向:0=顺时针,1=逆时针必须填写',
        'reward_tier' => '中奖档位必须填写',
        'status' => '状态:0=失败,1=成功必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'lottery_config_id',
            'lottery_type',
            'is_win',
            'direction',
            'reward_tier',
            'status',
        ],
        'update' => [
            'lottery_config_id',
            'lottery_type',
            'is_win',
            'direction',
            'reward_tier',
            'status',
        ],
    ];

}
