Files
verifikator/app/Models/Verifikator/JabatanTugasTambahan.php
T
2026-08-07 10:47:09 +07:00

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);
}
}