🆕初始化脚本以及一些工具类
This commit is contained in:
21
constant/admin.go
Normal file
21
constant/admin.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package constant
|
||||
|
||||
type UserType int
|
||||
|
||||
const (
|
||||
NormalAdmin UserType = iota
|
||||
SuperAdmin
|
||||
)
|
||||
|
||||
var UserTypeMap = map[UserType]string{
|
||||
NormalAdmin: "普通管理员",
|
||||
SuperAdmin: "超级管理员",
|
||||
}
|
||||
|
||||
func (u UserType) String() string {
|
||||
if v, ok := UserTypeMap[u]; ok {
|
||||
return v
|
||||
}
|
||||
|
||||
return "未知类型"
|
||||
}
|
Reference in New Issue
Block a user