rsabhk_hsr/app/Models/Pegawai.php
hasrinuryawati 17278441a7 first
2025-04-27 00:49:56 +07:00

52 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class Pegawai extends Authenticatable
{
use HasFactory, SoftDeletes, Notifiable;
protected $table = 'pegawai';
protected $fillable = [
'created_at',
'created_by',
'updated_at',
'updated_by',
'deleted_at',
'deleted_by',
'nama',
'jenis_kelamin',
'email',
'password',
];
protected $hidden = [
'password',
'remember_token',
];
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
public function registrasi() : HasMany
{
return $this->hasMany(Registrasi::class, 'id_pegawai', 'id');
}
public function transaksi() : HasMany
{
return $this->hasMany(Transaksi::class, 'id_pegawai', 'id');
}
}