start project

This commit is contained in:
2026-05-15 16:33:34 +03:30
parent 553238b0fb
commit d756661b45
50 changed files with 3523 additions and 0 deletions

42
app/Models/Vod.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
#[Fillable([
'broadcast_id',
'channel_id',
'title',
'storage_path',
'playback_url',
'duration_seconds',
'size_bytes',
'published_at',
'expires_at',
])]
class Vod extends Model
{
use SoftDeletes;
protected function casts(): array
{
return [
'published_at' => 'datetime',
'expires_at' => 'datetime',
];
}
public function broadcast(): BelongsTo
{
return $this->belongsTo(Broadcast::class);
}
public function channel(): BelongsTo
{
return $this->belongsTo(Channel::class);
}
}