feat: 添加新的错误码以支持配置版本管理,更新彩票配置以启用手动审核,增强 API 路由以支持玩法和赔率版本化管理

This commit is contained in:
2026-05-11 10:08:48 +08:00
parent aeaf124096
commit 067c2b39f5
41 changed files with 2578 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** {@see play_config_items} — 与 {@see PlayType::play_code} 对齐。 */
class PlayConfigItem extends Model
{
protected $fillable = [
'version_id',
'play_code',
'is_enabled',
'min_bet_amount',
'max_bet_amount',
'display_order',
'rule_text_zh',
'rule_text_en',
'rule_text_ne',
'extra_config_json',
];
protected function casts(): array
{
return [
'version_id' => 'integer',
'is_enabled' => 'boolean',
'min_bet_amount' => 'integer',
'max_bet_amount' => 'integer',
'display_order' => 'integer',
'extra_config_json' => 'json',
];
}
/** @return BelongsTo<PlayConfigVersion, PlayConfigItem> */
public function version(): BelongsTo
{
return $this->belongsTo(PlayConfigVersion::class, 'version_id');
}
/** @return BelongsTo<PlayType, PlayConfigItem> */
public function playType(): BelongsTo
{
return $this->belongsTo(PlayType::class, 'play_code', 'play_code');
}
}