]> git.localhorst.tv Git - alttp.git/blob - app/Models/Episode.php
15af89cf76f715135d299f00ec902ec27cd9f5f2
[alttp.git] / app / Models / Episode.php
1 <?php
2
3 namespace App\Models;
4
5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model;
7
8 class Episode extends Model
9 {
10
11         use HasFactory;
12
13         public function channels() {
14                 return $this->belongsToMany(Channel::class);
15         }
16
17         public function crew() {
18                 return $this->hasMany(EpisodeCrew::class);
19         }
20
21         public function event() {
22                 return $this->belongsTo(Event::class);
23         }
24
25         public function players() {
26                 return $this->hasMany(EpisodePlayer::class);
27         }
28
29         protected $casts = [
30                 'confirmed' => 'boolean',
31                 'start' => 'datetime',
32         ];
33
34         protected $hidden = [
35                 'created_at',
36                 'ext_id',
37                 'updated_at',
38         ];
39
40 }