mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-03-21 18:04:46 -05:00
29 lines
597 B
PHP
29 lines
597 B
PHP
<?php
|
|
|
|
namespace App\Models\Admin\Archive;
|
|
|
|
use App\Enums\Game\Faction;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
/**
|
|
* @mixin IdeHelperArchivedGame
|
|
*/
|
|
class ArchivedGame extends Model
|
|
{
|
|
protected $casts = [
|
|
'dominant_faction' => Faction::class,
|
|
];
|
|
|
|
public function archivedPlayerProgressions(): HasMany
|
|
{
|
|
return $this->hasMany(ArchivedPlayerProgression::class);
|
|
}
|
|
|
|
public static function archivedGameExists(string $matchId) {
|
|
return ArchivedGame::where('id', '=', $matchId)->exists();
|
|
}
|
|
|
|
|
|
}
|