<?php

namespace App\Models;

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

class TransaksiDeposito extends Model
{
    use SoftDeletes;

	protected $table = 'data_deposito_trans';
	protected $primaryKey = 'trans_id';
    protected $keyType = 'string';
	public $incrementing = false;

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

	protected $guarded = [];

	public function deposito()
	{
		return $this->belongsTo(Deposito::class, 'rekening');
	}

    public function transaksi()
    {
        return $this->belongsTo(TableTransaksi::class, 'trans_kode', 'kode');
    }
}
