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

use plugin\saiadmin\basic\BaseValidate;

/**
 * 抽奖券获取记录验证器
 */
class DicePlayerTicketRecordValidate extends BaseValidate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'player_id' => 'require',
        'use_coins' => 'require',
        'total_ticket_count' => 'require',
        'paid_ticket_count' => 'require',
        'free_ticket_count' => 'require',
        'remark' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'player_id' => '玩家id必须填写',
        'use_coins' => '消耗硬币必须填写',
        'total_ticket_count' => '总抽奖次数必须填写',
        'paid_ticket_count' => '购买抽奖次数必须填写',
        'free_ticket_count' => '赠送抽奖次数必须填写',
        'remark' => '备注必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'player_id',
            'use_coins',
            'total_ticket_count',
            'paid_ticket_count',
            'free_ticket_count',
            'remark',
        ],
        'update' => [
            'player_id',
            'use_coins',
            'total_ticket_count',
            'paid_ticket_count',
            'free_ticket_count',
            'remark',
        ],
    ];

}
