<?php

namespace App\Models;

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

class CollateralCategory extends Model
{
    protected $fillable = ['business_id', 'name', 'description', 'status'];

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

    public function collaterals(): HasMany
    {
        return $this->hasMany(Collateral::class, 'category_id');
    }
}
