first commit

This commit is contained in:
Ariyutta
2026-08-07 10:47:09 +07:00
commit 1c094fbe7f
11630 changed files with 1580900 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use App\Models\DokSiremun\LogPengajuan;
use App\Models\Verifikator\LogVerifikasiSk;
use App\Models\Verifikator\Team;
use App\Models\Verifikator\TeamUser;
use App\Models\Verifikator\View\Pegawai;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
use HasFactory, Notifiable, HasRoles;
protected $table = 'verifikator.users';
protected $fillable = ['username', 'nip', 'name', 'email', 'password', 'periode', 'change_password_at_next_login', 'unit_ttd_id'];
protected $hidden = ['password', 'remember_token'];
function teams()
{
return $this->belongsToMany(Team::class, TeamUser::class, 'user_id', 'team_id')->withPivot('active', 'id');
}
function logVerifikasiSk()
{
return $this->hasMany(LogVerifikasiSk::class, 'verified_by', 'nip');
}
function logs()
{
return $this->morphMany(LogPengajuan::class, 'logable');
}
function pegawais()
{
return $this->hasManyThrough(Pegawai::class, 'user_id', 'nip', 'id', 'nip');
}
}