<?php

namespace App\Models;

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

class LedgerEntry extends Model
{
    use HasFactory;

    protected $guarded = [];

    public function accountable()
    {
        return $this->morphTo('account', 'account_type', 'account_id');
    }

    public function referenceable()
    {
        return $this->morphTo('reference', 'reference_type', 'reference_id');
    }
}
