feat: 添加新的错误码以支持投注功能,更新数据库填充器以增强玩法和赔率配置,扩展 API 路由以支持风险池管理
This commit is contained in:
37
app/Models/RiskPool.php
Normal file
37
app/Models/RiskPool.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/** 赔付池事实表 {@see risk_pools} */
|
||||
class RiskPool extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'draw_id',
|
||||
'normalized_number',
|
||||
'total_cap_amount',
|
||||
'locked_amount',
|
||||
'remaining_amount',
|
||||
'sold_out_status',
|
||||
'version',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'draw_id' => 'integer',
|
||||
'total_cap_amount' => 'integer',
|
||||
'locked_amount' => 'integer',
|
||||
'remaining_amount' => 'integer',
|
||||
'sold_out_status' => 'integer',
|
||||
'version' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function draw(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Draw::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user