// 账户安全页面类型定义

export interface SecuritySettings {
  id: string;
  userId: string;
  twoFactorEnabled: boolean;
  emailNotification: boolean;
  smsNotification: boolean;
  loginAlert: boolean;
  passwordStrength: 'weak' | 'medium' | 'strong';
  lastPasswordChange: string;
  loginAttempts: number;
  lastLoginTime: string;
  lastLoginIp: string;
  trustedDevices: TrustedDevice[];
  securityQuestions: SecurityQuestion[];
}

export interface TrustedDevice {
  id: string;
  deviceName: string;
  deviceType: 'desktop' | 'mobile' | 'tablet';
  browser: string;
  os: string;
  ipAddress: string;
  location: string;
  lastActive: string;
  isCurrent: boolean;
}

export interface SecurityQuestion {
  id: string;
  question: string;
  answer: string;
  isEnabled: boolean;
}

export interface PasswordChangeForm {
  currentPassword: string;
  newPassword: string;
  confirmPassword: string;
}

export interface SecurityQuestionForm {
  question: string;
  answer: string;
  confirmPassword: string;
}

export interface LoginHistory {
  id: string;
  loginTime: string;
  ipAddress: string;
  location: string;
  device: string;
  status: 'success' | 'failed';
  failureReason?: string;
}