skl/app/Models/HistoryPerusahaan.php

35 lines
822 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class HistoryPerusahaan extends Model
{
protected $table = 'HistoryPerusahaan';
protected $primaryKey = 'HistoryPerusahaanId';
protected $fillable = [
'PerusahaanId',
'RefHistoryKegiatanId',
'TanggalHistory',
'NomorHistory',
'KeteranganHistory',
'DokumenHistory',
];
public function perusahaan()
{
return $this->belongsTo(Perusahaan::class, 'PerusahaanId', 'PerusahaanId');
}
public function refhistoryKegiatan()
{
return $this->belongsTo(RefHistoryKegiatan::class, 'RefHistoryKegiatanId', 'RefHistoryKegiatanId');
}
public function kelurahan()
{
return $this->belongsTo(Kelurahan::class, 'KelurahanId', 'KelurahanId');
}
}