package mt

import (
	"f5"
)

type table struct {
	PayServerCluster *PayServerClusterTable
	PayDb            *PayDbTable
	GameDb           *GameDbTable
	Config           *ConfigTable
	AccountDb        *AccountDbTable
	ConfDb           *ConfDbTable
	Wxconfig         *WxconfigTable
	LoginRedis       *LoginRedisTable
}

var Table = f5.New(func(this *table) {
	this.PayServerCluster = f5.New(func(this *PayServerClusterTable) {
		this.FileName = "../config/payserver.cluster.json"
		this.PrimKey = "instance_id"
	})

	this.PayDb = f5.New(func(this *PayDbTable) {
		this.FileName = "../config/paydb.mysql.json"
		this.PrimKey = ""
	})

	this.GameDb = f5.New(func(this *GameDbTable) {
		this.FileName = "../config/gamedb.mysql.json"
		this.PrimKey = ""
	})

	this.AccountDb = f5.New(func(this *AccountDbTable) {
		this.FileName = "../config/accountdb.mysql.json"
		this.PrimKey = ""
	})

	this.ConfDb = f5.New(func(this *ConfDbTable) {
		this.FileName = "../config/confdb.mysql.json"
		this.PrimKey = ""
	})

	this.Config = f5.New(func(this *ConfigTable) {
		this.FileName = "../config/config.json"
		this.PrimKey = ""
	})

	this.Wxconfig = f5.New(func(this *WxconfigTable) {
		this.FileName = "../res/wxconfig@wxconfig.json"
		this.PrimKey = "gameid"
	})

	this.LoginRedis = f5.New(func(this *LoginRedisTable){
		this.FileName = "../config/login.redis.json"
		this.PrimKey = ""
	})
})
