feat: 添加新的错误码以支持投注功能,更新数据库填充器以增强玩法和赔率配置,扩展 API 路由以支持风险池管理

This commit is contained in:
2026-05-11 11:52:23 +08:00
parent 067c2b39f5
commit 058f596f34
29 changed files with 2300 additions and 122 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** 风险池占用日志 {@see risk_pool_lock_logs} */
class RiskPoolLockLog extends Model
{
public $timestamps = false;
protected $fillable = [
'draw_id',
'normalized_number',
'ticket_item_id',
'action_type',
'amount',
'source_reason',
'created_at',
];
protected function casts(): array
{
return [
'draw_id' => 'integer',
'ticket_item_id' => 'integer',
'amount' => 'integer',
'created_at' => 'datetime',
];
}
public function draw(): BelongsTo
{
return $this->belongsTo(Draw::class);
}
public function ticketItem(): BelongsTo
{
return $this->belongsTo(TicketItem::class, 'ticket_item_id');
}
}