<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;

class AzmayeshType extends Model
{
    use HasFactory;

    protected $guarded = [];
    protected $hidden = ['pivot'];

    public function azmayeshes(): HasMany
    {
        return $this->hasMany(Azmayesh::class);
    }

    public function azmayeshFields(): BelongsToMany
    {
        return $this->belongsToMany(AzmayeshField::class,'azmayesh_field_azmayesh_type');
    }
}
