package roomrank import ( "apigame/service-common/svconst" "apigame/service-common/svmysql" "fmt" ) // DataRoomRankRoom 房间排行持久数据 type DataRoomRankRoom struct { Id int64 `gorm:"column:id;primaryKey;comment:房间唯一ID"` Uid int64 `gorm:"comment:玩家唯一ID"` ActivityId int64 `gorm:"comment:活动ID"` CreateTime int64 `gorm:"comment:创建时间戳"` UpdateTime int64 `gorm:"comment:修改时间戳"` } func (d *DataRoomRankRoom) MysqlInfo(suffix string) *svmysql.MysqlInfo { tableName := svconst.MYSQL_TABLE_S_ROOMRANK_ROOM return &svmysql.MysqlInfo{ DbMysql: svconst.DbCommon, TableName: tableName + suffix, } } func (d *DataRoomRankRoom) GetSuffix(gameId string) string { return fmt.Sprintf("%s_%d", gameId, d.ActivityId) }