<?php

namespace App\Models;

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

class GeneralJournalTemp extends Model
{
    use HasFactory;

    protected $table = 'general_journal_temps';
    protected $fillable = [
        'date',
        'account_id',
        'narration',
        'reference',
        'currency_id',
        'tr_code',
        'amount',
        'status'
    ];

    public function account()
    {
        return $this->belongsTo(MainAccount::class, 'account_id');
    }

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