Finish all the i18n things of code.
This commit is contained in:
@ -6,21 +6,27 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
//游客身份
|
||||
//guest
|
||||
USER_ROLE_GUEST = "GUEST"
|
||||
//普通注册用户
|
||||
//normal user
|
||||
USER_ROLE_USER = "USER"
|
||||
//管理员
|
||||
//administrator
|
||||
USER_ROLE_ADMINISTRATOR = "ADMINISTRATOR"
|
||||
)
|
||||
|
||||
const (
|
||||
//正常状态
|
||||
//ok
|
||||
USER_STATUS_OK = "OK"
|
||||
//被禁用
|
||||
//disabled
|
||||
USER_STATUS_DISABLED = "DISABLED"
|
||||
)
|
||||
|
||||
const (
|
||||
//username pattern
|
||||
USERNAME_PATTERN = `^[0-9a-z_]+$`
|
||||
USERNAME_DEMO = "demo"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
Base
|
||||
Role string `json:"role" gorm:"type:varchar(45)"`
|
||||
|
Reference in New Issue
Block a user