cloud-ide-lms-model
Version:
Package for Model management of Cloud IDEsys LMS
106 lines (105 loc) • 3.49 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MSystemPagesCheckCodeExistsPayload = exports.MSystemPagesToggleStatusPayload = exports.MSystemPagesInsertUpdatePayload = exports.MSystemPagesDeletePayload = exports.MSystemPagesGetByIdPayload = exports.MSystemPages = void 0;
const common_1 = require("../../common-types/common");
const schema_1 = require("../../schema");
/* INTERFACE END */
/* MODEL START */
class MSystemPages extends common_1.MTableQueries {
constructor(init) {
super(init);
Object.assign(this, init);
}
Validate() {
let errorLogger = {};
return errorLogger;
}
}
exports.MSystemPages = MSystemPages;
class MSystemPagesGetByIdPayload {
constructor(init) {
Object.assign(this, init);
}
Validate() {
let errorLogger = {};
if (!this.sypg_id) {
errorLogger.sypg_id = "Page ID is Required!";
}
return errorLogger;
}
}
exports.MSystemPagesGetByIdPayload = MSystemPagesGetByIdPayload;
class MSystemPagesDeletePayload {
constructor(init) {
Object.assign(this, init);
}
Validate() {
let errorLogger = {};
if (!this.sypg_id) {
errorLogger.sypg_id = "Page ID is Required!";
}
return errorLogger;
}
}
exports.MSystemPagesDeletePayload = MSystemPagesDeletePayload;
class MSystemPagesInsertUpdatePayload extends schema_1.ICoreSypg {
constructor(init) {
super();
Object.assign(this, init);
}
Validate() {
let errorLogger = {};
if (!this.sypg_title) {
errorLogger.sypg_title = "Page title is required!";
}
else if (this.sypg_title.length > 100) {
errorLogger.sypg_title = "Page title cannot exceed 100 characters!";
}
if (!this.sypg_desc) {
errorLogger.sypg_desc = "Page description is required!";
}
else if (this.sypg_desc.length > 255) {
errorLogger.sypg_desc = "Page description cannot exceed 255 characters!";
}
if (!this.sypg_page_code) {
errorLogger.sypg_page_code = "Page code is required!";
}
else if (this.sypg_page_code.length > 40) {
errorLogger.sypg_page_code = "Page code cannot exceed 40 characters!";
}
return errorLogger;
}
}
exports.MSystemPagesInsertUpdatePayload = MSystemPagesInsertUpdatePayload;
class MSystemPagesToggleStatusPayload {
constructor(init) {
Object.assign(this, init);
}
Validate() {
let errorLogger = {};
if (!this.sypg_id) {
errorLogger.sypg_id = "Page ID is required!";
}
if (typeof this.sypg_isactive !== 'boolean') {
errorLogger.sypg_isactive = "Active status must be a boolean value!";
}
return errorLogger;
}
}
exports.MSystemPagesToggleStatusPayload = MSystemPagesToggleStatusPayload;
class MSystemPagesCheckCodeExistsPayload {
constructor(init) {
Object.assign(this, init);
}
Validate() {
let errorLogger = {};
if (!this.sypg_page_code) {
errorLogger.sypg_page_code = "Page code is required!";
}
else if (this.sypg_page_code.length > 40) {
errorLogger.sypg_page_code = "Page code cannot exceed 40 characters!";
}
return errorLogger;
}
}
exports.MSystemPagesCheckCodeExistsPayload = MSystemPagesCheckCodeExistsPayload;