<?php

namespace App\Models;

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

class DatasetTambahan extends Model
{
    use SoftDeletes;
    
    protected $table = 'dataset-tambahan';
    protected $primaryKey = 'DatasetTambahanId';
    protected $guarded = [];

    function tabelData() {
        return $this->belongsTo('App\Models\Master\TabelData','template_id');
    }

    function instansi() {
        return $this->belongsTo('App\Models\Master\Instansi','instansi_id');
    }

    function user() {
        return $this->belongsTo('App\Models\User','created_by');
    }

    function template() {
        return $this->belongsTo('App\Models\Master\Template','template_id');
    }
}
