[色子游戏]玩家抽奖记录

This commit is contained in:
2026-03-03 16:01:47 +08:00
parent 18c1a0a693
commit 3606d4635e
8 changed files with 753 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
<?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',
'lottery_id' => 'require',
'lottery_name' => 'require',
];
/**
* 定义错误信息
*/
protected $message = [
'player_id' => '玩家id必须填写',
'lottery_config_id' => '彩金池配置必须填写',
'lottery_type' => '抽奖类型必须填写',
'is_win' => '中奖必须填写',
'win_coin' => '赢取平台币必须填写',
'reward_config_id' => '奖励配置id必须填写',
'lottery_id' => '奖池必须填写',
'lottery_name' => '奖池名必须填写',
];
/**
* 定义场景
*/
protected $scene = [
'save' => [
'player_id',
'lottery_config_id',
'lottery_type',
'is_win',
'win_coin',
'reward_config_id',
'lottery_id',
'lottery_name',
],
'update' => [
'player_id',
'lottery_config_id',
'lottery_type',
'is_win',
'win_coin',
'reward_config_id',
'lottery_id',
'lottery_name',
],
];
}