<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class DataInventarisHapusBuku
 *
 * @property string $trans_id
 * @property string|null $trans_kode
 * @property string|null $trans_akun
 * @property string|null $inventaris_id
 * @property int $nominal
 * @property string|null $trans_catatan
 * @property Carbon|null $trans_tglbuku
 * @property Carbon|null $trans_date
 * @property int|null $created_by
 * @property int|null $deleted_by
 * @property int|null $status
 *
 * @property DataInventarisMaster|null $data_inventaris_master
 * @property TableAkun|null $table_akun
 *
 * @package App\Models
 */
class TransaksiHapusBukuInventaris extends Model
{
	protected $table = 'data_inventaris_hapus_buku';
	protected $primaryKey = 'trans_id';
	public $incrementing = false;
	public $timestamps = false;

	protected $casts = [
		'nominal' => 'int',
		'trans_tglbuku' => 'datetime',
		'trans_date' => 'datetime',
		'created_by' => 'int',
		'deleted_by' => 'int',
		'status' => 'int'
	];

	protected $fillable = [
		'trans_kode',
		'trans_akun',
		'inventaris_id',
		'nominal',
		'trans_catatan',
		'trans_tglbuku',
		'trans_date',
		'created_by',
		'deleted_by',
		'status'
	];

	public function inventaris()
	{
		return $this->belongsTo(Inventaris::class, 'inventaris_id');
	}

	public function ref_akun()
	{
		return $this->belongsTo(Akun::class, 'trans_akun');
	}
}
