Your IP : 216.73.216.79


Current Path : /var/www/html/dynaweb-cms-v1/app/Models/Backend/
Upload File :
Current File : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ContentCalendarTranslation.php

<?php

namespace App\Models\Backend;

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_calendar_translation', key: 'calendar_translation_id')]
#[Fillable([
    'calendar_translation_parent_id',
    'calendar_translation_title',
    'calendar_translation_content',
    'calendar_translation_location',
    'calendar_translation_main',
    'calendar_translation_language',
    'created_by',
    'updated_by',
])]
class ContentCalendarTranslation extends Model
{
    use HasFactory;

    protected function casts(): array
    {
        return [
            'calendar_translation_parent_id' => 'integer',
            'calendar_translation_main' => 'integer',
            'created_by' => 'integer',
            'updated_by' => 'integer',
            'created_at' => 'datetime',
            'updated_at' => 'datetime',
        ];
    }

    public function calendar()
    {
        return $this->belongsTo(
            ContentCalendar::class,
            'calendar_translation_parent_id',
            'calendar_id'
        );
    }
}