<?php

namespace App\Models;

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

class Dataset extends Model
{
    use HasFactory;

    protected $table = 'dataset';
    protected $primaryKey = 'DatasetId';
    protected $guarded = [];

    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');
    }
}
