渠道协议后台
This commit is contained in:
@@ -4,7 +4,7 @@ import ServerStategy, { GMMail } from "../../db/ServerStategy";
|
||||
import { RegionType } from "../../db/Region";
|
||||
import { RewardInter } from "../../pubUtils/interface";
|
||||
import { isTimestamp } from '../../pubUtils/util';
|
||||
import { isDate } from "util";
|
||||
import { isBoolean, isDate } from "util";
|
||||
|
||||
export class UpdateMailParams {
|
||||
hasGoods: boolean = false; // 是否有道具
|
||||
@@ -404,4 +404,34 @@ export class UpdateActivityParam {
|
||||
if(this.effectDay && !isNumber(this.effectDay)) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export class UpdateChannelParam {
|
||||
code: string; // 渠道标识
|
||||
platform: string; // 渠道标识
|
||||
desc: string; // 渠道描述
|
||||
isDefaultPolicy: boolean; // 是否使用默认协议
|
||||
userPolicyLink: string; // 用户协议
|
||||
privacyPolicyLink: string; // 隐私协议
|
||||
|
||||
constructor(obj?: any) {
|
||||
if(!obj) return;
|
||||
this.code = obj.code;
|
||||
this.platform = obj.platform;
|
||||
this.desc = obj.desc;
|
||||
this.isDefaultPolicy = obj.isDefaultPolicy;
|
||||
this.userPolicyLink = obj.userPolicyLink;
|
||||
this.privacyPolicyLink = obj.privacyPolicyLink;
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
if(!this.code || !isString(this.code)) return false;
|
||||
if(!this.platform || !isString(this.platform)) return false;
|
||||
if(this.desc && !isString(this.desc)) return false;
|
||||
if(!isBoolean(this.isDefaultPolicy)) return false;
|
||||
if(this.userPolicyLink && !isString(this.userPolicyLink)) return false;
|
||||
if(this.privacyPolicyLink && !isString(this.privacyPolicyLink)) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user