This commit is contained in:
AfonsoCMSousa committed 2026-01-02 00:39:39 +00:00
1 parent bcdf542606
commit e84dd993af
11 files changed
+539 -37

No files matched your search

+11
View File
@@ -29,11 +29,22 @@ class Game extends Model
'match_id'
];
protected $casts = [
'began_at' => 'datetime',
'ended_at' => 'datetime',
'is_draw' => 'boolean',
];
public function winner()
{
return $this->belongsTo(User::class, "winner_user_id");
}
public function loser()
{
return $this->belongsTo(User::class, "loser_user_id");
}
public function player1()
{
return $this->belongsTo(User::class, 'player1_user_id');