ecs/servers/user/logic/entity.go
2025-06-04 18:17:39 +08:00

27 lines
640 B
Go

package logic
import (
"fmt"
)
const TableUser = "user"
type User struct {
Id string `bson:"_id"`
UserId uint64 `bson:"user_id"`
Platform uint32 `bson:"platform"`
Channel uint32 `bson:"channel"`
Username string `bson:"username"`
Password string `bson:"password"`
CreateTime int64 `bson:"create_time"`
RecentServer uint32 `bson:"recent_server"`
BanLogin bool `bson:"ban_login"`
BanLoginTime int64 `bson:"ban_login_time"`
ThirdInfo map[string]interface{} `bson:"third_info"`
}
func UserKey(channel uint32, username string) string {
return fmt.Sprintf("%d:%s", channel, username)
}