78 lines
1.7 KiB
Go
78 lines
1.7 KiB
Go
package mt
|
|
|
|
import (
|
|
"f5"
|
|
)
|
|
|
|
type table struct {
|
|
WheelServerCluster *WheelServerClusterTable
|
|
Config *ConfigTable
|
|
Web3ServiceCluster *Web3ServiceClusterTable
|
|
WheelDb *WheelDbTable
|
|
Item *ItemTable
|
|
Friend *FriendTable
|
|
Global *GlobalTable
|
|
Reward *RewardTable
|
|
Task *TaskTable
|
|
Buff *BuffTable
|
|
MapGrid *MapGridTable
|
|
}
|
|
|
|
var Table = f5.New(func(this *table) {
|
|
this.WheelServerCluster = f5.New(func(this *WheelServerClusterTable) {
|
|
this.FileName = "../config/wheelserver.cluster.json"
|
|
this.PrimKey = "instance_id"
|
|
})
|
|
|
|
this.Web3ServiceCluster = f5.New(func(this *Web3ServiceClusterTable) {
|
|
this.FileName = "../config/web3service.cluster.json"
|
|
this.PrimKey = ""
|
|
})
|
|
|
|
this.Config = f5.New(func(this *ConfigTable) {
|
|
this.FileName = "../config/config.json"
|
|
this.PrimKey = ""
|
|
})
|
|
|
|
this.WheelDb = f5.New(func(this *WheelDbTable) {
|
|
this.FileName = "../config/wheeldb.json"
|
|
this.PrimKey = ""
|
|
})
|
|
|
|
this.Item = f5.New(func(this *ItemTable) {
|
|
this.FileName = "../res/item@item.json"
|
|
this.PrimKey = "id"
|
|
})
|
|
|
|
this.Friend = f5.New(func(this *FriendTable) {
|
|
this.FileName = "../res/friend@friend.json"
|
|
this.PrimKey = "id"
|
|
})
|
|
|
|
this.Global = f5.New(func(this *GlobalTable) {
|
|
this.FileName = "../res/global@global.json"
|
|
this.PrimKey = "type"
|
|
})
|
|
|
|
this.Reward = f5.New(func(this *RewardTable) {
|
|
this.FileName = "../res/reward@reward.json"
|
|
this.PrimKey = ""
|
|
})
|
|
|
|
this.Task = f5.New(func(this *TaskTable) {
|
|
this.FileName = "../res/task@task.json"
|
|
this.PrimKey = "id"
|
|
})
|
|
|
|
this.Buff = f5.New(func(this *BuffTable) {
|
|
this.FileName = "../res/buff@buff.json"
|
|
this.PrimKey = "buff_id"
|
|
})
|
|
|
|
this.MapGrid = f5.New(func(this *MapGridTable) {
|
|
this.FileName = "../res/mapGrid@mapGrid.json"
|
|
this.PrimKey = "id"
|
|
})
|
|
|
|
})
|