<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Equipment extends BaseModel
{
    protected $table = 'equipment';
    protected $guarded = ['id'];
    protected $casts = [
        'lastMaintenance' => 'date',
        'nextMaintenance' => 'date',
        'hoursUsed' => 'decimal:2',
    ];

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