Files
soybean-admin/src/typings/business.d.ts
2023-03-08 06:41:10 +08:00

46 lines
936 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** 用户相关模块 */
declare namespace Auth {
/**
* 用户角色类型(前端静态路由用角色类型进行路由权限的控制)
* - super: 超级管理员(该权限具有所有路由数据)
* - admin: 管理员
* - user: 用户
*/
type RoleType = 'super' | 'admin' | 'user';
/** 用户信息 */
interface UserInfo {
/** 用户id */
userId: string;
/** 用户名 */
userName: string;
/** 用户角色类型 */
userRole: RoleType;
}
}
declare namespace UserManagement {
interface User extends ApiUserManagement.User {
/** 序号 */
index: number;
/** 表格的keyid */
key: string;
}
/**
* 用户性别
* - 0: 女
* - 1: 男
*/
type GenderKey = NonNullable<User['gender']>;
/**
* 用户状态
* - 1: 启用
* - 2: 禁用
* - 3: 冻结
* - 4: 软删除
*/
type UserStatusKey = NonNullable<User['userStatus']>;
}