Add baccarat loss cover activity

This commit is contained in:
2026-04-11 23:27:29 +08:00
parent dd9a8c5db8
commit e43dceab2c
22 changed files with 1898 additions and 5 deletions
+11 -1
View File
@@ -3,7 +3,7 @@
/**
* 文件功能:百家乐下注记录模型
*
* 记录用户在某局中的押注信息结算状态。
* 记录用户在某局中的押注信息结算状态以及关联的买单活动
*
* @author ChatRoom Laravel
*
@@ -20,6 +20,7 @@ class BaccaratBet extends Model
protected $fillable = [
'round_id',
'user_id',
'loss_cover_event_id',
'bet_type',
'amount',
'payout',
@@ -32,6 +33,7 @@ class BaccaratBet extends Model
protected function casts(): array
{
return [
'loss_cover_event_id' => 'integer',
'amount' => 'integer',
'payout' => 'integer',
];
@@ -53,6 +55,14 @@ class BaccaratBet extends Model
return $this->belongsTo(User::class);
}
/**
* 关联参与的百家乐买单活动。
*/
public function lossCoverEvent(): BelongsTo
{
return $this->belongsTo(BaccaratLossCoverEvent::class, 'loss_cover_event_id');
}
/**
* 获取押注类型中文名。
*/