]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Episode.php
chat bot settings
[alttp.git] / app / Models / Episode.php
index 15af89cf76f715135d299f00ec902ec27cd9f5f2..7d3175c4778e19b72d9f9558610d9518a7103410 100644 (file)
@@ -11,13 +11,19 @@ class Episode extends Model
        use HasFactory;
 
        public function channels() {
-               return $this->belongsToMany(Channel::class);
+               return $this->belongsToMany(Channel::class)
+                       ->using(Restream::class)
+                       ->withPivot('accept_comms', 'accept_tracker');
        }
 
        public function crew() {
                return $this->hasMany(EpisodeCrew::class);
        }
 
+       public function confirmedCrew() {
+               return $this->crew()->where('confirmed', true);
+       }
+
        public function event() {
                return $this->belongsTo(Event::class);
        }
@@ -33,7 +39,6 @@ class Episode extends Model
 
        protected $hidden = [
                'created_at',
-               'ext_id',
                'updated_at',
        ];