feat: 添加新的错误码以支持投注功能,更新数据库填充器以增强玩法和赔率配置,扩展 API 路由以支持风险池管理
This commit is contained in:
37
app/Models/TicketCombination.php
Normal file
37
app/Models/TicketCombination.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/** 注项展开组合 {@see ticket_combinations} */
|
||||
class TicketCombination extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'ticket_item_id',
|
||||
'combination_no',
|
||||
'number_4d',
|
||||
'bet_amount',
|
||||
'estimated_payout',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'ticket_item_id' => 'integer',
|
||||
'combination_no' => 'integer',
|
||||
'bet_amount' => 'integer',
|
||||
'estimated_payout' => 'integer',
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function item(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TicketItem::class, 'ticket_item_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user