<?php

    namespace App\Models;

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

    class Chronology extends ContentTypeModel
    {
        use LanguageSupportTrait;

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

        protected $fillable = [
            'external_id'
        ];

        public function epigraphs() {
            return $this->belongsToMany(Epigraph::class)->withPivot('position')->withTimestamps();
        }

        public function properties() {
            return $this->belongsToMany(Property::class)->withPivot('position')->withTimestamps();
        }
    }
