cloud-ide-lms-model
Version:
Package for Model management of Cloud IDEsys LMS
34 lines (33 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MMenu = void 0;
/* INTERFACE END */
/* MODEL START */
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;