38 lines
747 B
PHP
38 lines
747 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PelaporanDate extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'PelaporanDate';
|
|
|
|
protected $primaryKey = 'PelaporanDateId';
|
|
|
|
protected $fillable = [
|
|
'PelaporanId',
|
|
'RefPelaporanId',
|
|
'ReportDate',
|
|
];
|
|
|
|
/**
|
|
* Relasi ke model Pelaporan.
|
|
*/
|
|
public function pelaporan()
|
|
{
|
|
return $this->belongsTo(Pelaporan::class, 'PelaporanId', 'PelaporanId');
|
|
}
|
|
|
|
/**
|
|
* Relasi ke model RefPelaporan.
|
|
*/
|
|
public function refPelaporan()
|
|
{
|
|
return $this->belongsTo(RefPelaporan::class, 'RefPelaporanId', 'RefPelaporanId');
|
|
}
|
|
}
|