// 用户相关类型
export interface User {
  id: string;
  username: string;
  email?: string;
  phone?: string;
  avatar?: string;
  role?: string;
  department?: string;
  createdAt?: string;
  updatedAt?: string;
}

// 登录相关类型
export interface LoginParams {
  tenant: string;
  username: string;
  password: string;
}

export interface LoginResponse {
  token: string;
  user: User;
}

// API 响应类型
export interface ApiResponse<T = any> {
  code: number;
  data: T;
  message: string;
}

// 分页相关类型
export interface PaginationParams {
  page?: number;
  pageSize?: number;
  keyword?: string;
}

export interface PaginationResponse<T> {
  list: T[];
  total: number;
  page: number;
  pageSize: number;
}

// 用户 VO 类型
export interface UserVO {
  id: number;
  username: string;
  nickname: string;
  deptId?: number;
  postIds?: string[];
  email?: string;
  mobile?: string;
  sex?: number;
  avatar?: string;
  loginIp?: string;
  status?: number;
  remark?: string;
  loginDate?: Date | string;
  createTime?: Date | string;
  expireTime?: Date | string | number;
  cardNfc?: string;
}

// 角色 VO 类型
export interface RoleVO {
  id: number;
  name: string;
  code?: string;
  sort?: number;
  status?: number;
  remark?: string;
}

// 岗位/工作站节点类型
export interface WorkstationNode {
  id: number;
  workstationName: string;
  parentId?: number;
  children?: WorkstationNode[];
  [key: string]: any;
}

// 用户特征值（人脸/指纹列表项，与人脸列表接口返回一致）
export interface UserCharacteristic {
  id: number;
  userId: number;
  type: string;
  content?: string;
  createTime?: number | string;
  imagePath?: string;
  imageUrl?: string;
  orderNum?: number;
  remark?: string | null;
}

