UNPKG

cloud-ide-model-schema

Version:

Pachage for schema management of Cloud IDEsys LMS

56 lines (55 loc) 2.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CAppRegistrationStartMst = void 0; var mongoose_1 = require("mongoose"); /* SCHEMA START */ var app_registration_start_mst = new mongoose_1.Schema({ appstart_reg_id_appreg: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "app_registration_mst", required: true, comment: "FK to app_registration_mst - Reference to registration" }, appstart_start_date: { type: Date, required: true, default: Date.now, comment: "Start date" }, appstart_configuration_data: { type: mongoose_1.Schema.Types.Mixed, comment: "JSON object - General app configuration (icon_file_id_cyfm, splash_screen_file_id_cyfm, default_version, app_description, general_settings)" }, appstart_start_status_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", required: true, comment: "FK to core_general_master - Start status (APP_START_STATUS)" }, appstart_started_by_id_auth: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "auth_user_mst", required: true, comment: "FK to auth_user_mst - User who started" }, appstart_completed_at: { type: Date, comment: "Date when registration start was completed" }, appstart_created_at: { type: Date, default: Date.now, comment: "Creation timestamp" }, appstart_updated_at: { type: Date, default: Date.now, comment: "Last update timestamp" } }, { collection: 'app_registration_start_mst', timestamps: { createdAt: 'appstart_created_at', updatedAt: 'appstart_updated_at' } }); // Indexes for performance optimization app_registration_start_mst.index({ appstart_reg_id_appreg: 1 }); app_registration_start_mst.index({ appstart_start_status_id_sygms: 1 }); app_registration_start_mst.index({ appstart_started_by_id_auth: 1 }); var CAppRegistrationStartMst = mongoose_1.default.model("app_registration_start_mst", app_registration_start_mst); exports.CAppRegistrationStartMst = CAppRegistrationStartMst;