<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class Tag extends Model
{
    protected $table = 'tags';

    protected $fillable = [
        'naam',
        'categorie',
    ];

    public function documents(): BelongsToMany
    {
        return $this->belongsToMany(Document::class, 'document_tag');
    }

    public function kennisArtikelen(): BelongsToMany
    {
        return $this->belongsToMany(KennisArtikel::class, 'kennis_artikel_tag');
    }

    public function lessonsLearned(): BelongsToMany
    {
        return $this->belongsToMany(LessonLearned::class, 'lesson_learned_tag');
    }
}
