// 个人中心类型定义

// 用户个人信息
export interface UserProfile {
  id: string;
  username: string;
  name: string;
  email?: string;
  phone?: string;
  avatar?: string;
  gender?: 'male' | 'female';
  birthday?: string;
  department?: string;
  position?: string;
  enterpriseId?: string;
  enterpriseName?: string;
  roleIds: string[];
  roleNames: string[];
  bio?: string;
  address?: string;
  status?: 'pending' | 'approved' | 'rejected'; // 审核状态：待审核、审核通过、驳回
  createdAt: string;
  lastLoginTime?: string;
  lastLoginIp?: string;
}

// 密码修改
export interface PasswordChange {
  oldPassword: string;
  newPassword: string;
  confirmPassword: string;
}

// 注册信息
export interface RegisterForm {
  username: string;
  password: string;
  confirmPassword: string;
  name: string;
  phone: string;
  email?: string;
  verificationCode: string;
  agreementAccepted: boolean;
}

// 登录信息
export interface LoginForm {
  username?: string;
  phone?: string;
  password?: string;
  verificationCode?: string;
  captcha: string;
  rememberMe: boolean;
  loginType: 'password' | 'sms';
}

// 登录响应
export interface LoginResponse {
  token: string;
  refreshToken: string;
  user: UserProfile;
  expiresIn: number; // 秒
}
