UNPKG

cloud-ide-lms-model

Version:

Package for Model management of Cloud IDEsys LMS

84 lines (83 loc) 2.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MFeeDiscountRuleToggleStatusPayload = exports.MFeeDiscountRuleInsertUpdatePayload = exports.MFeeDiscountRuleDeletePayload = exports.MFeeDiscountRuleGetByIdPayload = exports.MFeeDiscountRule = void 0; const common_1 = require("../../common-types/common"); const schema_1 = require("../../schema"); /* INTERFACE END */ /* MODEL START */ class MFeeDiscountRule extends common_1.MTableQueries { constructor(init) { super(init); Object.assign(this, init); } Validate() { let errorLogger = {}; return errorLogger; } } exports.MFeeDiscountRule = MFeeDiscountRule; class MFeeDiscountRuleGetByIdPayload { constructor(init) { Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.feedr_id) { errorLogger.feedr_id = "Discount Rule ID is Required!"; } return errorLogger; } } exports.MFeeDiscountRuleGetByIdPayload = MFeeDiscountRuleGetByIdPayload; class MFeeDiscountRuleDeletePayload { constructor(init) { Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.feedr_id) { errorLogger.feedr_id = "Discount Rule ID is Required!"; } return errorLogger; } } exports.MFeeDiscountRuleDeletePayload = MFeeDiscountRuleDeletePayload; class MFeeDiscountRuleToggleStatusPayload { constructor(init) { Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.feedr_id) { errorLogger.feedr_id = "Discount Rule ID is Required!"; } return errorLogger; } } exports.MFeeDiscountRuleToggleStatusPayload = MFeeDiscountRuleToggleStatusPayload; class MFeeDiscountRuleInsertUpdatePayload extends schema_1.FeeDiscountRule { constructor(init) { super(); Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.feedr_name) { errorLogger.feedr_name = "Rule name is required!"; } if (!this.feedr_code) { errorLogger.feedr_code = "Rule code is required!"; } if (!this.feedr_discount_type) { errorLogger.feedr_discount_type = "Discount type is required!"; } if (!this.feedr_discount_value || this.feedr_discount_value <= 0) { errorLogger.feedr_discount_value = "Valid discount value is required!"; } if (!this.feedr_mode) { errorLogger.feedr_mode = "Mode (Automatic/Manual) is required!"; } return errorLogger; } } exports.MFeeDiscountRuleInsertUpdatePayload = MFeeDiscountRuleInsertUpdatePayload;