增加后台管理模块
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
// 管理员相关类型定义
|
||||
|
||||
export interface Admin {
|
||||
id: string
|
||||
account: string
|
||||
username: string
|
||||
email?: string
|
||||
phone?: string
|
||||
avatar?: string
|
||||
role: 'super_admin' | 'admin' | 'operator'
|
||||
permissions?: string
|
||||
status: number
|
||||
lastLoginTime?: string
|
||||
lastLoginIp?: string
|
||||
loginCount?: number
|
||||
department?: string
|
||||
position?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface AdminLoginRequest {
|
||||
account: string
|
||||
password: string
|
||||
}
|
||||
|
||||
export interface AdminAuthResponse {
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
expiresIn: number
|
||||
adminInfo: Admin
|
||||
loginTime: string
|
||||
}
|
||||
|
||||
export interface AdminPageRequest {
|
||||
current: number
|
||||
size: number
|
||||
account?: string
|
||||
username?: string
|
||||
email?: string
|
||||
phone?: string
|
||||
role?: string
|
||||
status?: number
|
||||
department?: string
|
||||
keyword?: string
|
||||
}
|
||||
|
||||
export interface AdminCreateRequest {
|
||||
account: string
|
||||
password: string
|
||||
username: string
|
||||
email?: string
|
||||
phone?: string
|
||||
avatar?: string
|
||||
role: string
|
||||
permissions?: string
|
||||
department?: string
|
||||
position?: string
|
||||
}
|
||||
|
||||
export interface AdminUpdateRequest {
|
||||
id: string
|
||||
username?: string
|
||||
email?: string
|
||||
phone?: string
|
||||
avatar?: string
|
||||
role?: string
|
||||
permissions?: string
|
||||
status?: number
|
||||
department?: string
|
||||
position?: string
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// 通用类型定义
|
||||
|
||||
export interface ApiResponse<T = any> {
|
||||
code: number
|
||||
message: string
|
||||
data: T
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
export interface PageResult<T = any> {
|
||||
records: T[]
|
||||
total: number
|
||||
current: number
|
||||
size: number
|
||||
pages: number
|
||||
}
|
||||
|
||||
export interface MenuItem {
|
||||
path: string
|
||||
name: string
|
||||
icon?: string
|
||||
children?: MenuItem[]
|
||||
meta?: {
|
||||
title: string
|
||||
icon?: string
|
||||
roles?: string[]
|
||||
hidden?: boolean
|
||||
}
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_APP_TITLE: string
|
||||
readonly VITE_APP_BASE_API: string
|
||||
readonly VITE_APP_PORT: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// 用户相关类型定义
|
||||
|
||||
export interface User {
|
||||
id: string
|
||||
account: string
|
||||
username: string
|
||||
email?: string
|
||||
phone?: string
|
||||
avatar?: string
|
||||
nickname?: string
|
||||
status: number
|
||||
memberLevel?: string
|
||||
totalDays?: number
|
||||
lastActiveTime?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface UserPageRequest {
|
||||
current: number
|
||||
size: number
|
||||
account?: string
|
||||
username?: string
|
||||
email?: string
|
||||
phone?: string
|
||||
status?: number
|
||||
memberLevel?: string
|
||||
keyword?: string
|
||||
}
|
||||
Reference in New Issue
Block a user