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