Add user manager. Optimize code.

This commit is contained in:
2023-11-01 18:21:05 +08:00
parent b548fb8083
commit e68cff4612
11 changed files with 127 additions and 24 deletions

30
src/global.d.ts vendored
View File

@@ -75,10 +75,26 @@ type UserWithPowerInfoVo = {
operations: OperationVo[]
}
type UserWithRoleInfoVo = {
id: string
username: string
locking: boolean
expiration: Date
credentialsExpiration: Date
enable: number
lastLoginTime: Date
lastLoginIp: string
createTime: Date
updateTime: Date
userInfo: UserInfoVo
roles: RoleVo[]
groups: GroupVo[]
}
type UserInfoVo = {
id: string
userId: string
nickName: string
nickname: string
avatar: string
email: string
}
@@ -113,6 +129,18 @@ type OperationVo = {
elementId: number
}
type RoleVo = {
id: string
name: string
enable: boolean
}
type GroupVo = {
id: string
name: string
enable: boolean
}
type LoginForm = {
username: string
password: string