<?php

namespace App\Models;

use App\Blameable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ProdukDeposito extends Model
{
    use SoftDeletes, Blameable;

    protected $table = 'data_deposito_produk';

    protected $casts = [
        'id' => 'int',
        'created_by' => 'int',
        'updated_by' => 'int',
        'deleted_by' => 'int',
        'status' => 'int',
    ];

    protected $guarded = [];

    public function akun_jurnal()
    {
        return $this->belongsTo(Akun::class, 'akun_jurnal_id', 'kode_akun');
    }

    public function akun_biaya_bunga()
    {
        return $this->belongsTo(Akun::class, 'akun_biaya_bunga_id', 'kode_akun');
    }
}
