import type { MenuTreeNode } from './permission'

export type TokenPair = {
  accessToken: string
  refreshToken: string
}

/** 身份摘要（/admin/base/auth/me）；权限表见 AuthPerms */
export type AuthMe = {
  adminId: number
  username?: string
  tenantId?: number | null
  tenantEnabled?: boolean
}

export type AuthPerms = {
  isSuper: boolean
  perms: string[]
  menus: MenuTreeNode[]
  tenantEnabled?: boolean
  tenantId?: number | null
  dataScope?: string
  dataScopeDeptIds?: number[]
}
