<?php

namespace App\Models;

use App\Models\Project;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class MasterUnit extends Model
{
    use HasFactory;

    protected $table    = 'tbl_unit';

    protected $fillable = [
        'unit_code',
        'unit_name',
        'project_id',
        'status',
        'description'
    ];

    public function project(): BelongsTo
    {
        return $this->belongsTo(Project::class);
    }
}
