新增统计,小游戏,系统设置

This commit is contained in:
2026-06-11 13:49:20 +08:00
parent 3120c56620
commit 064ba727e0
11 changed files with 827 additions and 144 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace app\admin\model;
use think\model;
use think\model\relation\BelongsTo;
/**
* PromoReward 模型
*/
class PromoReward extends model
{
protected $autoWriteTimestamp = true;
protected $updateTime = false;
public static function onBeforeDelete(): bool
{
return false;
}
public function getGameTypeTextAttr($value, $data)
{
$gameType = $data['game_type'] ?? 0;
return UserScoreLog::GAME_TYPE_LIST[$gameType] ?? 'Unknown Game';
}
protected $append = ['game_type_text'];
public function user(): BelongsTo
{
return $this->belongsTo(User::class, 'user_id');
}
}