feat(服务器): 多服务器开服

This commit is contained in:
luying
2023-07-31 15:18:47 +08:00
parent 7e80d740c2
commit 4c0f0bb56b
5 changed files with 74 additions and 22 deletions

View File

@@ -183,6 +183,38 @@ export class CreateRegionParam {
}
}
export class CreateServersParam {
env: string = '';
openTime: number[] = [];
activityGroupId: number[] = [];
hasOpenMail: boolean = false;
openMail?: GMMail;
// hasCircleMail: boolean = false;
// circleMail?: GMMail;
stopRegisterTime: number = 0;
constructor(obj?: any) {
if(obj) {
for(let key in obj) {
this[key] = obj[key];
}
}
}
checkParams() {
// console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail)
if(!this.env || !this.openTime || !this.stopRegisterTime ) {
return false
}
if(!isArray(this.openTime)) return false;
for(let time of this.openTime) {
if(!isNumber(time)) return false;
}
if(this.hasOpenMail && !this.openMail) return false;
// if(this.hasCircleMail && !this.circleMail) return false;
return true;
}
}
export class CreateServerParam {
env: string = '';
openTime: number = 0;
@@ -214,16 +246,6 @@ export class CreateServerParam {
}
}
checkParams() {
// console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail)
if(!this.env || !this.openTime || !this.stopRegisterTime ) {
return false
}
if(this.hasOpenMail && !this.openMail) return false;
// if(this.hasCircleMail && !this.circleMail) return false;
return true;
}
}
export class CreateGiftCode {