X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FTournament.php;h=6f0feb1237db7a8693c20bf7e73e7c44f62e3fa7;hb=e49b130505f5712075dca2ff990e5a63fc90ce3c;hp=56ffe78f79c5dc1dc9b488f962b6c01f69bc6434;hpb=a4260a00251cef4ad806c9d5c44d4c444d6ab831;p=alttp.git diff --git a/app/Models/Tournament.php b/app/Models/Tournament.php index 56ffe78..6f0feb1 100644 --- a/app/Models/Tournament.php +++ b/app/Models/Tournament.php @@ -21,6 +21,10 @@ class Tournament extends Model return $runners; } + public function hasScoreboard() { + return $this->type == 'signup-async'; + } + public function updatePlacement() { $runners = []; foreach ($this->participants as $p) { @@ -61,6 +65,10 @@ class Tournament extends Model } + public function applications() { + return $this->hasMany(Application::class); + } + public function participants() { return $this->hasMany(Participant::class); } @@ -75,6 +83,7 @@ class Tournament extends Model protected $casts = [ + 'accept_applications' => 'boolean', 'locked' => 'boolean', 'no_record' => 'boolean', ];