package roomrank import ( "apigame/service-common/svconst" "apigame/service-common/svmysql" "apigame/util/util-lx/lxtime" ) // DataRoomRank 房间排行持久数据 type DataRoomRank 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 int `gorm:"comment:所在房间唯一ID"` CreateTime int64 `gorm:"comment:创建时间戳"` UpdateTime int64 `gorm:"comment:修改时间戳"` } func (d *DataRoomRank) MysqlInfo(suffix string) *svmysql.MysqlInfo { tableName := svconst.MYSQL_TABLE_S_ROOMRANK_DATA return &svmysql.MysqlInfo{ DbMysql: svconst.DbCommon, TableName: tableName + suffix, } } func NewDataRoomRank(uid int64) *DataRoomRank { d := &DataRoomRank{ Uid: uid, } return d } func (d *DataRoomRank) Init(uid int64) { d.Uid = uid d.CreateTime = lxtime.NowUninx() }