<?php

namespace App\Models;

use App\Models\BudgetDetail;
use App\Models\Transaction;
use App\Models\UnitType;
use Illuminate\Database\Eloquent\Model;

class QuantityUnit extends Model
{
  protected $fillable = [
    'budget_detail_id',
    'transaction_id',
    'unit_type_id',
    'quantity',
  ];

  public function unitType()
  {
    return $this->belongsTo(UnitType::class);
  }

  public function budgetDetail()
  {
    return $this->belongsTo(BudgetDetail::class);
  }

  public function transaction()
  {
    return $this->belongsTo(Transaction::class);
  }
}
