init.go
698 Bytes
package service
import (
"apigame/service-common/svconst"
"apigame/service-common/svmysql"
"apigame/service/cardholder"
"apigame/service/roomrank"
)
func Init() {
// create table
// 卡牌卡包
for _, gameId := range svconst.GameListCardHolder {
svmysql.InitTable(new(cardholder.DataCardHolder), gameId, true)
svmysql.InitTable(new(cardholder.RecordCardHolderOpen), gameId, true)
svmysql.InitTable(new(cardholder.RecordCardHolderRewardAlbum), gameId, true)
svmysql.InitTable(new(cardholder.RecordCardHolderRewardRound), gameId, true)
}
// 卡牌卡包
for _, gameId := range svconst.GameListRoomRank {
svmysql.InitTable(new(roomrank.DataRoomRankPlayer), gameId, true)
}
}