2022-03-11 05:57:55 +00:00
|
|
|
/**
|
|
|
|
* 用户角色枚举
|
|
|
|
*/
|
|
|
|
export enum UserRole {
|
2022-03-12 02:31:03 +00:00
|
|
|
normal = 'normal',
|
|
|
|
admin = 'admin',
|
|
|
|
superadmin = 'superadmin',
|
2022-03-11 05:57:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户状态枚举
|
|
|
|
*/
|
|
|
|
export enum UserStatus {
|
2022-03-12 02:31:03 +00:00
|
|
|
normal = 'normal',
|
|
|
|
locked = 'locked',
|
2022-03-11 05:57:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户数据定义
|
|
|
|
*/
|
|
|
|
export interface IUser {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
password?: string;
|
|
|
|
avatar?: string;
|
|
|
|
email?: string;
|
|
|
|
role: UserRole;
|
|
|
|
status: UserStatus;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 登录用户数据定义
|
|
|
|
*/
|
|
|
|
export interface ILoginUser extends IUser {
|
|
|
|
token: string;
|
|
|
|
}
|