60 lines
1.3 KiB
PHP
60 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models\DokSiremun;
|
|
|
|
use App\Models\Verifikator\Tendik;
|
|
use App\Models\Verifikator\UnitKerja;
|
|
use App\Models\Verifikator\View\Pegawai;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Skp extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $table = 'public.skps';
|
|
protected $fillable = [
|
|
'id_periode',
|
|
'id_pelaksana',
|
|
'nama_pelaksana',
|
|
'status_verifikasi_id',
|
|
'nilai',
|
|
'poin_total',
|
|
'pembagi',
|
|
'pengurang',
|
|
'kriteria',
|
|
'unit_pembayaran_id',
|
|
];
|
|
|
|
function tendik()
|
|
{
|
|
return $this->belongsTo(Tendik::class, 'id_pelaksana', 'nip');
|
|
}
|
|
|
|
function statusVerifikasi()
|
|
{
|
|
return $this->belongsTo(StatusVerifikasi::class);
|
|
}
|
|
|
|
function logs()
|
|
{
|
|
return $this->morphMany(LogPengajuan::class, 'logable');
|
|
}
|
|
|
|
function notes()
|
|
{
|
|
return $this->morphMany(CatatanPengajuan::class, 'noteable');
|
|
}
|
|
|
|
function pegawai()
|
|
{
|
|
return $this->belongsTo(Pegawai::class, 'id_pelaksana', 'nip');
|
|
}
|
|
|
|
function unit()
|
|
{
|
|
return $this->belongsTo(UnitKerja::class, 'unit_pembayaran_id', 'id');
|
|
}
|
|
}
|