UNPKG

cloud-ide-model-schema

Version:

Pachage for schema management of Cloud IDEsys LMS

72 lines (71 loc) 2.39 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CAppUpdateChangelogMst = void 0; var mongoose_1 = require("mongoose"); /* SCHEMA START */ var app_update_changelog_mst = new mongoose_1.Schema({ appchg_version_id_appver: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "app_version_mst", required: true, comment: "FK to app_version_mst - Reference to app version" }, appchg_category_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", required: true, comment: "FK to core_general_master - Changelog category (APP_CHANGELOG_CATEGORY)" }, appchg_title: { type: String, required: true, maxlength: 200, trim: true, comment: "Brief title" }, appchg_description: { type: String, required: true, maxlength: 2000, trim: true, comment: "Detailed description" }, appchg_bug_id: { type: String, maxlength: 100, trim: true, comment: "Related bug/ticket ID" }, appchg_affected_modules: { type: [String], comment: "Which modules affected" }, appchg_priority_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", required: true, comment: "FK to core_general_master - Priority (APP_PRIORITY)" }, appchg_tags: { type: [String], comment: "Tags for filtering" }, appchg_created_by_id_auth: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "auth_user_mst", required: true, comment: "FK to auth_user_mst - User who created" }, appchg_created_at: { type: Date, default: Date.now, comment: "Creation timestamp" } }, { collection: 'app_update_changelog_mst' }); // Indexes for performance optimization app_update_changelog_mst.index({ appchg_version_id_appver: 1 }); app_update_changelog_mst.index({ appchg_category_id_sygms: 1 }); app_update_changelog_mst.index({ appchg_priority_id_sygms: 1 }); app_update_changelog_mst.index({ appchg_created_at: -1 }); var CAppUpdateChangelogMst = mongoose_1.default.model("app_update_changelog_mst", app_update_changelog_mst); exports.CAppUpdateChangelogMst = CAppUpdateChangelogMst;