<?php

namespace App\Models;

use App\Models\Traits\Filterable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserUnitType extends Model
{
  use HasFactory, Filterable;

  protected $fillable = [
    'user_id',
    'department_id',
    'unit_type_id',
  ];

  public function user()
  {
    return $this->belongsTo(User::class);
  }

  public function unitType()
  {
    return $this->belongsTo(UnitType::class);
  }
}
