初始化项目
This commit is contained in:
39
src/types.ts
Normal file
39
src/types.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
export type Role = 'admin' | 'operator' | 'viewer';
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
name: string;
|
||||
role: Role;
|
||||
avatar?: string;
|
||||
}
|
||||
|
||||
export interface Device {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
status: 'online' | 'offline' | 'alert';
|
||||
battery: number;
|
||||
cpu: number;
|
||||
temp: number;
|
||||
lastUpdate: string;
|
||||
}
|
||||
|
||||
export interface Alert {
|
||||
id: string;
|
||||
deviceId: string;
|
||||
deviceName: string;
|
||||
type: 'critical' | 'warning' | 'info';
|
||||
message: string;
|
||||
time: string;
|
||||
handled: boolean;
|
||||
}
|
||||
|
||||
export interface VideoRecord {
|
||||
id: string;
|
||||
deviceId: string;
|
||||
deviceName: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
size: string;
|
||||
url: string;
|
||||
}
|
||||
Reference in New Issue
Block a user