| Current Path : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ |
| Current File : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ContentVideoTranslation.php |
<?php
namespace App\Models\Backend;
use App\Models\Backend\ContentVideo;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Table;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
#[Table('content_video_translation', key: 'video_translation_id')]
#[Fillable([
'video_translation_parent_id',
'video_translation_title',
'video_translation_content',
'video_translation_location',
'video_translation_url',
'video_translation_main',
'video_translation_language',
'created_by',
'updated_by',
])]
class ContentVideoTranslation extends Model
{
use HasFactory;
protected function casts(): array
{
return [
'video_translation_parent_id' => 'integer',
'video_translation_main' => 'integer',
'created_by' => 'integer',
'updated_by' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}
public function video()
{
return $this->belongsTo(
ContentVideo::class,
'video_translation_parent_id',
'video_id'
);
}
}