<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class InventoryProductType extends Model
{
    protected $table = 'inventory_product_types';

    protected $fillable = ['code', 'name', 'sort_order'];

    protected $casts = [
        'sort_order' => 'integer',
    ];

    public function inventoryProducts(): HasMany
    {
        return $this->hasMany(InventoryProduct::class, 'product_type_id');
    }
}
