diff --git a/server/backtask/mt/MailDb.go b/server/backtask/mt/MailDb.go new file mode 100644 index 00000000..d6015824 --- /dev/null +++ b/server/backtask/mt/MailDb.go @@ -0,0 +1,14 @@ +package mt + +import ( + "f5" + "mtb" +) + +type MailDb struct { + mtb.MailDb +} + +type MailDbTable struct { + f5.IdMetaTable[MailDb] +} diff --git a/server/backtask/mt/export.go b/server/backtask/mt/export.go index be6ee310..ee0fbf3a 100644 --- a/server/backtask/mt/export.go +++ b/server/backtask/mt/export.go @@ -7,6 +7,7 @@ import ( type table struct { BackTaskCluster *BackTaskClusterTable GameDb *GameDbTable + MailDb *MailDbTable BcEventDb *BcEventDbTable BcNftDb *BcNftDbTable Config *ConfigTable @@ -29,6 +30,11 @@ var Table = f5.New(func(this *table) { this.PrimKey = "" }) + this.MailDb = f5.New(func(this *MailDbTable) { + this.FileName = "../config/maildb.mysql.json" + this.PrimKey = "" + }) + this.BcEventDb = f5.New(func(this *BcEventDbTable) { this.FileName = "../config/bceventdb.mysql.json" this.PrimKey = "" diff --git a/server/backtask/mtb/mtb.auto_gen.go b/server/backtask/mtb/mtb.auto_gen.go index ca6b187e..e101eb5b 100644 --- a/server/backtask/mtb/mtb.auto_gen.go +++ b/server/backtask/mtb/mtb.auto_gen.go @@ -24,6 +24,17 @@ type GameDb struct { _flags2_ uint64 } +type MailDb struct { + host string + port int32 + user string + passwd string + database string + + _flags1_ uint64 + _flags2_ uint64 +} + type BcNftDb struct { host string port int32 @@ -158,6 +169,46 @@ func (this *GameDb) HasDatabase() bool { return (this._flags1_ & (uint64(1) << 5)) > 0 } +func (this *MailDb) GetHost() string { + return this.host +} + +func (this *MailDb) HasHost() bool { + return (this._flags1_ & (uint64(1) << 1)) > 0 +} + +func (this *MailDb) GetPort() int32 { + return this.port +} + +func (this *MailDb) HasPort() bool { + return (this._flags1_ & (uint64(1) << 2)) > 0 +} + +func (this *MailDb) GetUser() string { + return this.user +} + +func (this *MailDb) HasUser() bool { + return (this._flags1_ & (uint64(1) << 3)) > 0 +} + +func (this *MailDb) GetPasswd() string { + return this.passwd +} + +func (this *MailDb) HasPasswd() bool { + return (this._flags1_ & (uint64(1) << 4)) > 0 +} + +func (this *MailDb) GetDatabase() string { + return this.database +} + +func (this *MailDb) HasDatabase() bool { + return (this._flags1_ & (uint64(1) << 5)) > 0 +} + func (this *BcNftDb) GetHost() string { return this.host } @@ -397,6 +448,14 @@ func (this *GameDb) LoadFromKv(kv map[string]interface{}) { f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv) } +func (this *MailDb) LoadFromKv(kv map[string]interface{}) { + f5.ReadMetaTableField(&this.host, "host", &this._flags1_, 1, kv) + f5.ReadMetaTableField(&this.port, "port", &this._flags1_, 2, kv) + f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv) + f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv) + f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv) +} + func (this *BcNftDb) LoadFromKv(kv map[string]interface{}) { f5.ReadMetaTableField(&this.host, "host", &this._flags1_, 1, kv) f5.ReadMetaTableField(&this.port, "port", &this._flags1_, 2, kv) diff --git a/server/backtask/proto/mt.proto b/server/backtask/proto/mt.proto index a434997b..8b32c21d 100644 --- a/server/backtask/proto/mt.proto +++ b/server/backtask/proto/mt.proto @@ -18,6 +18,15 @@ message GameDb optional string database = 5; } +message MailDb +{ + optional string host = 1; + optional int32 port = 2; + optional string user = 3; + optional string passwd = 4; + optional string database = 5; +} + message BcNftDb { optional string host = 1;