package roomrank import ( "apigame/service-common/svconst" "apigame/service-common/svmysql" "apigame/util/util-lx/lxtime" ) // DataRoomRankPlayer 房间排行持久数据 type DataRoomRankPlayer struct { Uid int64 `gorm:"column:uid;primaryKey;comment:玩家唯一ID"` ActivityId int64 `gorm:"comment:活动ID"` UserType int `gorm:"comment:用户类型"` // 0=新手用户 1=优质用户 2=普通用户 3=垃圾用户 UserScore int `gorm:"comment:用户评级分"` UserClass int `gorm:"comment:用户评级"` RoomUid int64 `gorm:"comment:所在房间唯一ID"` CreateTime int64 `gorm:"comment:创建时间戳"` UpdateTime int64 `gorm:"comment:修改时间戳"` } func (d *DataRoomRankPlayer) MysqlInfo(suffix string) *svmysql.MysqlInfo { tableName := svconst.MYSQL_TABLE_S_ROOMRANK_PLAYER return &svmysql.MysqlInfo{ DbMysql: svconst.DbCommon, TableName: tableName + suffix, } } func NewDataRoomRankPlayer(uid int64) *DataRoomRankPlayer { d := &DataRoomRankPlayer{ Uid: uid, } return d } func (d *DataRoomRankPlayer) Init(uid int64) { d.Uid = uid d.CreateTime = lxtime.NowUninx() }