<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Unit extends Model
{
    use HasFactory;
    public $timestamps = false;

    protected $table = 'units';

    protected $primaryKey = 'unit_id';
    public function equipments(){
        
        return $this->hasMany(Equipment::class, 'unit_id', 'unit_id');
    }

    public function pendingEquipments(){
        return $this->hasMany(PendingEquipment::class, 'pending_equipment_unit_id', 'unit_id');
    }
}
