export interface ResponseData<T> {
  code: number
  msg: string
  data: T
}

export interface PageDTO<T> {
  rows: T[]
  total: number
}

export interface DictionaryData {
  label: string
  value: number
  cssTag: string
}

export interface ConfigDTO {
  isCaptchaOn: boolean
  isRegisterUserOn?: boolean
  dictionary: Record<string, DictionaryData[]>
}

export interface CaptchaDTO {
  isCaptchaOn: boolean
  captchaCodeKey?: string
  captchaCodeImg?: string
}

export interface UserInfoDTO {
  avatar?: string
  email?: string
  nickname?: string
  phoneNumber?: string
  roleName?: string
  sex?: number
  status?: number
  userId?: number
  username?: string
}

export interface CurrentLoginUserDTO {
  userInfo: UserInfoDTO
  roleKey: string
  permissions: string[]
}

export interface TokenDTO {
  token: string
  currentUser: CurrentLoginUserDTO
}

