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

use plugin\saiadmin\basic\BaseValidate;

/**
 * 玩家抽奖记录验证器
 */
class DicePlayRecordValidate extends BaseValidate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'player_id' => 'require',
        'lottery_config_id' => 'require',
        'lottery_type' => 'require',
        'is_win' => 'require',
        'win_coin' => 'require',
        'reward_config_id' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'player_id' => '玩家必须填写',
        'lottery_config_id' => '彩金池配置必须填写',
        'lottery_type' => '抽奖类型必须填写',
        'is_win' => '中奖必须填写',
        'win_coin' => '赢取平台币必须填写',
        'reward_config_id' => '奖励配置必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'player_id',
            'lottery_config_id',
            'lottery_type',
            'is_win',
            'win_coin',
            'reward_config_id',
        ],
        'update' => [
            'player_id',
            'lottery_config_id',
            'lottery_type',
            'is_win',
            'win_coin',
            'reward_config_id',
        ],
    ];

}
