UNPKG

cloud-ide-model-schema

Version:

Pachage for schema management of Cloud IDEsys LMS

76 lines (75 loc) 1.96 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CCoreSype = void 0; var cloud_ide_lms_model_1 = require("cloud-ide-lms-model"); var mongoose_1 = require("mongoose"); /* SCHEMA START */ var core_page_elements = new mongoose_1.Schema({ sype_page_id_sypg: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_system_pages" }, sype_title: { type: String, minlength: 0, maxlength: 100, trim: true }, sype_type: { type: String, minlength: 0, maxlength: 20, trim: true }, sype_placeholder: { type: String, minlength: 0, maxlength: 100, trim: true }, sype_auto_complete: { type: String, minlength: 0, maxlength: 100, trim: true }, sype_key: { type: String, minlength: 0, maxlength: 150, trim: true }, sype_min_length: { type: Number, maxlength: 20 }, sype_max_length: { type: String, maxlength: 20 }, sype_regex: { type: String, maxlength: 200, trim: true }, sype_required: { type: Boolean, default: true }, sype_tooltip: { type: String, maxlength: 255, trim: true }, sype_default: {}, sype_disabled: { type: Boolean, default: false }, sype_isactive: { type: Boolean, default: true } }, { collection: cloud_ide_lms_model_1.COLLECTIONS === null || cloud_ide_lms_model_1.COLLECTIONS === void 0 ? void 0 : cloud_ide_lms_model_1.COLLECTIONS.core_page_elements }); var CCoreSype = mongoose_1.default.model(cloud_ide_lms_model_1.COLLECTIONS === null || cloud_ide_lms_model_1.COLLECTIONS === void 0 ? void 0 : cloud_ide_lms_model_1.COLLECTIONS.core_page_elements, core_page_elements); exports.CCoreSype = CCoreSype;