<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Sumberdana extends Model
{
    protected $table = "keu_sumber_dana";
    protected $primaryKey = "id";
    protected $fillable = ['id', 'id_perkiraan', 'tahun', 'created_at', 'updated_at'];

    public function transaksiSumberdana()
    {
    	return $this->hasMany("App\SumberdanaDetail", "id_keu_sumber_dana");
    }

    public function perkiraanAkun()
    {
    	return $this->belongsTo("App\Perkiraan", "dari_akun");
    }

}
