<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Expense extends Model
{
    use HasFactory;

    protected $fillable = [
        'currency_id',
        'expense_category_id',
        'expense_no',
        'expense_date',
        'category',
        'frequency',
        'amount',
        'reference',
        'notes',
    ];

    protected $casts = [
        'expense_date' => 'date',
    ];

    public function currency()
    {
        return $this->belongsTo(Currency::class);
    }
}
