重构DiceLotteryConfig为DiceLotteryPoolConfig
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | saiadmin [ saiadmin快速开发框架 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: your name
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\dice\validate\lottery_pool_config;
|
||||
|
||||
use plugin\saiadmin\basic\BaseValidate;
|
||||
|
||||
/**
|
||||
* 色子奖池配置验证器
|
||||
*/
|
||||
class DiceLotteryPoolConfigValidate extends BaseValidate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'name' => 'require',
|
||||
'type' => 'require',
|
||||
't1_weight' => 'require',
|
||||
't2_weight' => 'require',
|
||||
't3_weight' => 'require',
|
||||
't4_weight' => 'require',
|
||||
't5_weight' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
*/
|
||||
protected $message = [
|
||||
'name' => '名称必须填写',
|
||||
'type' => '奖池类型必须填写',
|
||||
't1_weight' => 'T1池权重必须填写',
|
||||
't2_weight' => 'T2池权重必须填写',
|
||||
't3_weight' => 'T3池权重必须填写',
|
||||
't4_weight' => 'T4池权重必须填写',
|
||||
't5_weight' => 'T5池权重必须填写',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'save' => [
|
||||
'name',
|
||||
'type',
|
||||
't1_weight',
|
||||
't2_weight',
|
||||
't3_weight',
|
||||
't4_weight',
|
||||
't5_weight',
|
||||
],
|
||||
'update' => [
|
||||
'name',
|
||||
'type',
|
||||
't1_weight',
|
||||
't2_weight',
|
||||
't3_weight',
|
||||
't4_weight',
|
||||
't5_weight',
|
||||
],
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user