feat: complete master satpam with ID, Regu 1/2/3, Penempatan, and auto-generated guard login accounts

This commit is contained in:
Wahyudin
2026-10-13 13:46:35 +07:00
parent 53bf79239d
commit 3b1020b12c
10 changed files with 672 additions and 144 deletions
+15
View File
@@ -11,14 +11,29 @@ class SecurityGuard extends Model
use HasFactory;
protected $fillable = [
'badge_id',
'name',
'team',
'gate_id',
'user_id',
'is_active',
];
protected $casts = [
'is_active' => 'boolean',
'team' => 'integer',
];
public function gate()
{
return $this->belongsTo(Gate::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
public function activities(): HasMany
{
return $this->hasMany(VehicleActivity::class);