<?php

namespace App\Models;

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

class Topic extends ContentTypeModel
{
    use LanguageSupportTrait;

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

    public function documents() {
        return $this->belongsToMany(Document::class)->withPivot('position');
    }

    public function pressRelease() {
        return $this->hasMany(PressRelease::class);
    }

    public function videoItems() {
        return $this->hasMany(VideoItem::class);
    }

    public function block() {
        return $this->hasMany(Block::class);
    }

    public function eventItem() {
        return $this->hasMany(EventItem::class);
    }
}
