Files
dafuweng-saiadmin6.x/server/app/dice/validate/reward_config/DiceRewardConfigValidate.php

38 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\dice\validate\reward_config;
use plugin\saiadmin\basic\BaseValidate;
/**
* 奖励配置验证器DiceRewardConfigBIGWIN 的 weight 存本表0-10000
*/
class DiceRewardConfigValidate extends BaseValidate
{
protected $rule = [
'grid_number' => 'require',
'ui_text' => 'require',
'real_ev' => 'require',
'tier' => 'require',
'type' => 'number',
'weight' => 'number|between:0,10000', // BIGWIN 大奖权重,仅档位为 BIGWIN 时使用
];
protected $message = [
'grid_number' => '色子点数必须填写',
'ui_text' => '前端显示文本必须填写',
'real_ev' => '真实资金结算必须填写',
'tier' => '所属档位必须填写',
'type' => '奖励类型须为数字',
];
protected $scene = [
'save' => ['grid_number', 'ui_text', 'real_ev', 'tier', 'type'],
'update' => ['grid_number', 'ui_text', 'real_ev', 'tier', 'type', 'weight'],
];
}