Finish all the i18n things of code.

This commit is contained in:
zicla
2019-05-06 02:18:08 +08:00
parent e37b248c8c
commit 54c5905a58
38 changed files with 504 additions and 720 deletions

View File

@ -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)"`