feat: complete master satpam with ID, Regu 1/2/3, Penempatan, and auto-generated guard login accounts
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user