26 lines
621 B
PHP
26 lines
621 B
PHP
<?php
|
|
|
|
namespace App\Models\Verifikator;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class JabatanTugasTambahan extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'verifikator.jabatan_tugas_tambahans';
|
|
protected $with = ['detail'];
|
|
protected $fillable = ['id', 'nama', 'jenis_pegawai_id'];
|
|
|
|
function details()
|
|
{
|
|
return $this->hasMany(JabatanTugasTambahanRiwayat::class, 'jtt_id', 'id');
|
|
}
|
|
|
|
function detail()
|
|
{
|
|
return $this->hasOne(JabatanTugasTambahanRiwayat::class, 'jtt_id', 'id')->where('periode', 377);
|
|
}
|
|
}
|