This commit is contained in:
2025-03-04 23:59:49 +08:00
parent 175e4c0d68
commit e6b7fe3848
6 changed files with 48 additions and 12 deletions

View File

@@ -4,6 +4,14 @@ export enum Role {
Normal = "normal",
}
export function getRole(role: Role) {
return {
[Role.Super]: "超级管理员",
[Role.Admin]: "管理员",
[Role.Normal]: "普通用户",
}[role]
}
export interface TutorialSlim {
display: number
title: string
@@ -22,4 +30,4 @@ export interface User {
last_login: Date
role: Role
is_active: boolean
}
}