<?php

namespace App\Models;

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

class Dataset extends Model
{
    use SoftDeletes;

    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 tabelData() {
        return $this->belongsTo('App\Models\Master\TabelData','ms_tabel_data_id');
    }
}
