33 lines
988 B
Go
Raw Normal View History

2025-04-26 13:50:26 +08:00
package model
import (
"admin/internal/db"
2025-04-28 15:56:04 +08:00
"time"
2025-04-26 13:50:26 +08:00
)
func init() {
db.RegisterTableModels(Role{})
}
// Role 空表就是用来兼容资源增删改查公共操作的实际列举账号等都是走各个项目api拉取
type Role struct {
2025-04-30 15:46:14 +08:00
ProjectId int
2025-05-05 10:30:33 +08:00
RoleId string `name:"角色ID" json:"roleId" where:"eq"`
Account string `name:"账号" json:"account" where:"eq"`
ServerConfId string `name:"区服id" json:"serverId" where:"eq"`
Name string `name:"名称" json:"roleName" where:"eq"`
2025-04-28 15:56:04 +08:00
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"`
2025-04-26 13:50:26 +08:00
}
func (lm *Role) TableName() string {
return "role"
}
func (m *Role) GetId() int {
return 0
}