fix: resolve homepage 404 and add mock data for user portrait
Add landing page, fix type errors, mark dynamic API route, and refactor user portrait page. Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
This commit is contained in:
58
types/device.ts
Normal file
58
types/device.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
export type DeviceStatus = "online" | "offline" | "unknown"
|
||||
|
||||
export interface Device {
|
||||
id: string
|
||||
name: string
|
||||
wechatId?: string
|
||||
group?: string
|
||||
tags?: string[]
|
||||
status: DeviceStatus
|
||||
lastSeen?: string
|
||||
}
|
||||
|
||||
export interface CreateDeviceParams {
|
||||
name: string
|
||||
wechatId?: string
|
||||
group?: string
|
||||
tags?: string[]
|
||||
}
|
||||
|
||||
export interface UpdateDeviceParams extends Partial<CreateDeviceParams> {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface QueryDeviceParams {
|
||||
keyword?: string
|
||||
tags?: string[]
|
||||
dateRange?: { start: string; end: string }
|
||||
page?: number
|
||||
pageSize?: number
|
||||
}
|
||||
|
||||
export interface DeviceStats {
|
||||
id: string
|
||||
tasksToday: number
|
||||
uptimePercent: number
|
||||
}
|
||||
|
||||
export interface DeviceTaskRecord {
|
||||
id: string
|
||||
deviceId: string
|
||||
type: string
|
||||
status: "success" | "failed"
|
||||
time: string
|
||||
}
|
||||
|
||||
export interface PaginatedResponse<T> {
|
||||
items: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
code: number
|
||||
message: string
|
||||
data: T | null
|
||||
}
|
||||
Reference in New Issue
Block a user