'datetime', 'last_login_at' => 'datetime', 'password_changed_at' => 'datetime', 'totp_enabled' => 'boolean', 'totp_confirmed_at' => 'datetime', 'password' => 'hashed', // 이걸로 통일 'must_reset_password' => 'boolean', 'totp_enabled' => 'boolean', 'totp_verified_at' => 'datetime', ]; public function getTwoFactorModeAttribute(): string { $hasSecret = !empty($this->totp_secret_enc); return ((int)($this->totp_enabled ?? 0) === 1 && $hasSecret) ? 'otp' : 'sms'; } public function getTotpRegisteredAttribute(): bool { return !empty($this->totp_secret_enc); } }