<?php

namespace App\Models;

use App\Libs\Database\Eloquent\ContentTypeModel;
use App\Models\GenericBackoffice\Traits\LanguageSupportTrait;
use Illuminate\Database\Eloquent\Relations\BelongsTo;


class MediaGalleryItem extends ContentTypeModel
{
    use LanguageSupportTrait;

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

    protected $table   = 'media_gallery_items';


    /**
     * Get the associated image
     *
     * @return BelongsTo
     */
    public function image(): BelongsTo
    {
        return $this->belongsTo(MediaItem::class);
    }

    /**
     * Get the associated exhibition
     *
     * @return BelongsTo
     */
    public function exhibition()
    {
        return $this->belongsTo(Exhibitions::class);
    }
}
