// src/types/user.ts
// 登录请求参数类型
export interface LoginRequest {
  username: string;
  password: string;
}

// 注册请求参数类型
export interface RegisterRequest {
  username: string;
  password: string;
  phone: string;
  email: string;
  avatar?: string;
  gender?: number;
  nickname?: string;
  isAdmin?: number;
}

// 登录响应数据类型
export interface LoginResponse {
  isAdmin: number;
  id: number;
  username: string;
  nickname: string;
  token: string;
}

// 用户信息类型
export interface UserInfo {
  id: number;
  username: string;
  nickname?: string;
  phone?: string;
  email?: string;
  avatar?: string;
  gender?: number;
  status?: number;
  password?: string;
  oldPassword?: string;
  createTime?: string;
  updateTime?: string;
  isAdmin?: number;
}

// 用户DTO类型（用于管理员操作）
export interface UserDTO {
  id?: number;
  username: string;
  password?: string;
  phone: string;
  email: string;
  avatar?: string;
  nickname?: string;
  gender?: number;
  status?: number;
  isAdmin?: number;
}
