<?php

namespace App\Models;

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

class EquipmentType extends Model
{
    use HasFactory;

    protected $table = 'equipment_types';

    protected $primaryKey = 'equipament_type_id';

    public function equipments(){
        return $this->hasMany(Equipment::class, 'equipment_type_id', 'equipment_type_id');
    }

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


    public function specificAttributesEquipamentTypes(){
        return $this->hasMany(SpecificAttributesEquipmentType::class, 'equipment_type_id', 'equipment_type_id');
    }

    public function equipmentAssociationAmbits(){
        return $this->hasMany(EquipmentAssociationAmbit::class,'equipment_type_id', 'equipment_type_id');
    }
}
