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

use plugin\saiadmin\basic\BaseValidate;

/**
 * 玩家钱包流水验证器
 */
class DicePlayerWalletRecordValidate extends BaseValidate
{
    /**
     * 定义验证规则
     */
    protected $rule = [
        'player_id' => 'require',
        'coin' => 'require',
        'type' => 'require',
        'wallet_before' => 'require',
        'wallet_after' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message = [
        'player_id' => '用户必须选择',
        'coin' => '平台币变化必须填写',
        'type' => '类型必须填写',
        'wallet_before' => '钱包操作前不能为空',
        'wallet_after' => '钱包操作后不能为空',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => ['player_id', 'coin', 'type', 'wallet_before', 'wallet_after'],
        'update' => ['player_id', 'coin', 'type', 'wallet_before', 'wallet_after'],
    ];

}
