<?php

namespace App\Models;

use App\Models\Backoffice\MediaItem;
use App\Models\Backoffice\Support\ContentTypeModel;
use App\Models\Backoffice\Traits\LanguageSupportTrait;

class Event extends ContentTypeModel
{
    use LanguageSupportTrait;

    protected $hidden = ['languages', "websites"];
    protected $with = ['languages', "websites"];


    public function category()
    {
        return $this->belongsTo(Category::class);
    }

    public function eventInformation()
    {
        return $this->hasMany(EventInfo::class);
    }

    public function featuredImage()
    {
        return $this->belongsTo(MediaItem::class, 'featured_image_id');
    }
}
