31 lines
886 B
Go
31 lines
886 B
Go
|
package model
|
|||
|
|
|||
|
import (
|
|||
|
"admin/internal/db"
|
|||
|
)
|
|||
|
|
|||
|
func init() {
|
|||
|
db.RegisterTableModels(Role{})
|
|||
|
}
|
|||
|
|
|||
|
// Role 空表,就是用来兼容资源增删改查公共操作的,实际列举账号等都是走各个项目api拉取
|
|||
|
type Role struct {
|
|||
|
RoleId string `name:"账号" json:"roleId"`
|
|||
|
Account string `name:"账号" json:"account"`
|
|||
|
ServerConfId string `name:"区服id" json:"serverId"`
|
|||
|
Name string `name:"名称" json:"roleName"`
|
|||
|
Status string `name:"状态" desc:"离线|在线" json:"status"`
|
|||
|
Level int `name:"等级" json:"roleLevel"`
|
|||
|
Profession string `name:"职业" json:"profession"`
|
|||
|
LatestLoginTime int64 `name:"最近登录时间" json:"latestLoginAt"`
|
|||
|
CreateTime int64 `name:"创建时间" json:"createAt"`
|
|||
|
}
|
|||
|
|
|||
|
func (lm *Role) TableName() string {
|
|||
|
return "role"
|
|||
|
}
|
|||
|
|
|||
|
func (m *Role) GetId() int {
|
|||
|
return 0
|
|||
|
}
|