*/ use HasFactory, Notifiable; protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'role' => UserRole::class, 'is_active' => 'boolean', 'two_factor_confirmed_at' => 'datetime', ]; } public function vms(): HasMany { return $this->hasMany(Customer::class, 'user_id'); } public function isAdmin(): bool { return $this->role === UserRole::Admin; } public function isCustomer(): bool { return $this->role === UserRole::Customer; } }