// 用户状态枚举
export enum UserStatus {
  Normal = 0,
  Disabled = 1
}

// 设备状态枚举
export enum DeviceStatus {
  Normal = 0,
  Disabled = 1
}

// 可见性类型枚举
export enum VisibilityType {
  Public = 0,
  Private = 1,
  Specified = 2
}

// 管理员角色枚举
export enum AdminRole {
  User = 0,
  Admin = 1,
  SuperAdmin = 2
}

// 用户信息
export interface User {
  id: string
  email: string
  userName: string
  avatar?: string
  role: AdminRole
  createdAt: string
  lastLoginAt?: string
}

// 设备信息
export interface Device {
  id: string
  deviceName: string
  deviceType: string
  isAdmin: boolean
  createdAt: string
  lastActiveAt: string
  status: DeviceStatus
}

// 书签信息
export interface Bookmark {
  id: string
  title: string
  url: string
  description?: string
  icon?: string
  tags: string[]
  visitCount: number
  lastVisitTime?: string
  order: number
  visibility: VisibilityType
  allowedDevices?: string[]
  createdAt: string
  updatedAt: string
}

// 标签信息
export interface Tag {
  name: string
  count: number
}

// API 响应包装
export interface ApiResponse<T = any> {
  success: boolean
  message?: string
  data?: T
  errorCode?: string
}

// 分页结果
export interface PagedResult<T> {
  items: T[]
  total: number
  page: number
  pageSize: number
  totalPages: number
  hasNextPage: boolean
  hasPreviousPage: boolean
}

// 认证响应
export interface AuthResponse {
  success: boolean
  message?: string
  accessToken?: string
  refreshToken?: string
  expiresAt?: string
  user?: User
  device?: Device
}

// 登录请求
export interface LoginRequest {
  email: string
  password: string
  deviceName?: string
  deviceType?: string
  deviceFingerprint?: string
}

// 注册请求
export interface RegisterRequest {
  email: string
  userName: string
  password: string
  confirmPassword: string
}

// 创建书签请求
export interface CreateBookmarkRequest {
  title: string
  url: string
  description?: string
  icon?: string
  tags?: string[]
  visibility?: VisibilityType
  allowedDevices?: string[]
}

// 更新书签请求
export interface UpdateBookmarkRequest {
  title?: string
  url?: string
  description?: string
  icon?: string
  tags?: string[]
  visibility?: VisibilityType
  allowedDevices?: string[]
}

