<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Inventory extends BaseModel
{
    protected $table = 'inventories';
    protected $guarded = ['id'];
    protected $casts = [
        'stockLevel' => 'decimal:2',
        'costPerUnit' => 'decimal:2',
        'minStockLevels' => 'decimal:2',
        'maxStockLevels' => 'decimal:2',
        'avgConsumption' => 'decimal:2',
    ];

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