Add baccarat loss cover activity
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取押注类型中文名。
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user