32 lines
923 B
Go
32 lines
923 B
Go
package model
|
||
|
||
import (
|
||
"admin/internal/db"
|
||
"time"
|
||
)
|
||
|
||
func init() {
|
||
db.RegisterTableModels(Role{})
|
||
}
|
||
|
||
// Role 空表,就是用来兼容资源增删改查公共操作的,实际列举账号等都是走各个项目api拉取
|
||
type Role struct {
|
||
RoleId string `name:"角色ID" 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 time.Time `name:"最近登录时间" json:"latestLoginAt"`
|
||
CreateTime time.Time `name:"创建时间" json:"createAt"`
|
||
}
|
||
|
||
func (lm *Role) TableName() string {
|
||
return "role"
|
||
}
|
||
|
||
func (m *Role) GetId() int {
|
||
return 0
|
||
}
|