UNPKG

cloud-ide-lms-model

Version:

Package for Model management of Cloud IDEsys LMS

84 lines (83 loc) 2.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MCoreSymeGetByIdPayload = exports.MCoreSymeDeletePayload = exports.MCoreSymeInsertUpdatePayload = exports.MMenuListPayload = exports.MMenu = void 0; const common_types_1 = require("../../common-types"); const schema_1 = require("../../schema"); /* INTERFACE END */ /* MODEL START */ class MMenuListPayload extends common_types_1.MTableQueries { constructor(init) { super(init); Object.assign(this, init); } Validate() { let errorLogger = {}; return errorLogger; } } exports.MMenuListPayload = MMenuListPayload; class MCoreSymeInsertUpdatePayload extends schema_1.ICoreSyme { constructor(init) { super(); Object.assign(this, init); } Validate() { let errorLogger = {}; return errorLogger; } } exports.MCoreSymeInsertUpdatePayload = MCoreSymeInsertUpdatePayload; class MCoreSymeGetByIdPayload { constructor(init) { Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.syme_id) { errorLogger.syme_id = "System menu ID is Required!"; } return errorLogger; } } exports.MCoreSymeGetByIdPayload = MCoreSymeGetByIdPayload; class MCoreSymeDeletePayload { constructor(init) { Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.syme_id) { errorLogger.syme_id = "System menu ID is Required!"; } return errorLogger; } } exports.MCoreSymeDeletePayload = MCoreSymeDeletePayload; class MMenu { constructor(init) { Object.assign(this, init); } Validate() { let errorLogger = {}; if (!this.syme_id && !this.syme_type) { errorLogger.syme_id = "System menu ID or menu Type is Required!"; } else { if (this.syme_type === 'module') { if (typeof (this === null || this === void 0 ? void 0 : this.syme_title) === 'undefined') { errorLogger.syme_title = "System menu title is Required!"; } } } if (!this.sort) { errorLogger.sort = "sort order is Required!"; } else { if (this.sort != 'asc' && this.sort != 'desc') { errorLogger.sort = "sort order is Required!"; } } return errorLogger; } } exports.MMenu = MMenu;