47 lines
818 B
PHP
47 lines
818 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Video extends Model
|
|
{
|
|
protected $table = 'videos';
|
|
|
|
protected $fillable = [
|
|
'channel_id',
|
|
'external_id',
|
|
'external_date',
|
|
'name',
|
|
'url',
|
|
'length',
|
|
'data_downloading',
|
|
'data_downloaded',
|
|
'processed',
|
|
];
|
|
|
|
/**
|
|
* Get the channel that owns the video.
|
|
*/
|
|
public function channel()
|
|
{
|
|
return $this->belongsTo(Channel::class);
|
|
}
|
|
|
|
/**
|
|
* Get the transcriptions for the video.
|
|
*/
|
|
public function transcriptions()
|
|
{
|
|
return $this->hasMany(Transcription::class);
|
|
}
|
|
|
|
/**
|
|
* Get the clips for the video.
|
|
*/
|
|
public function clips()
|
|
{
|
|
return $this->hasMany(Clip::class);
|
|
}
|
|
}
|