UNPKG

cloud-ide-model-schema

Version:

Pachage for schema management of Cloud IDEsys LMS

65 lines (64 loc) 2.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CAppBuildConfigMst = void 0; var mongoose_1 = require("mongoose"); /* SCHEMA START */ var app_build_config_mst = new mongoose_1.Schema({ appbuild_reg_id_appreg: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "app_registration_mst", required: true, comment: "FK to app_registration_mst - Reference to app registration" }, appbuild_link_id_applink: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "app_platform_link_mst", required: true, comment: "FK to app_platform_link_mst - Reference to platform link" }, appbuild_platform_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", required: true, comment: "FK to core_general_master - Platform type (APP_PLATFORM)" }, appbuild_build_type_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", required: true, comment: "FK to core_general_master - Build type (APP_BUILD_TYPE)" }, appbuild_config_data: { type: mongoose_1.Schema.Types.Mixed, comment: "JSON object - Build configuration (signing_config, build_settings, environment_variables, feature_flags)" }, appbuild_is_active: { type: Boolean, default: true, comment: "Is active build configuration" }, appbuild_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" }, appbuild_created_at: { type: Date, default: Date.now, comment: "Creation timestamp" }, appbuild_updated_at: { type: Date, default: Date.now, comment: "Last update timestamp" } }, { collection: 'app_build_config_mst', timestamps: { createdAt: 'appbuild_created_at', updatedAt: 'appbuild_updated_at' } }); // Indexes for performance optimization app_build_config_mst.index({ appbuild_link_id_applink: 1, appbuild_build_type_id_sygms: 1 }); app_build_config_mst.index({ appbuild_reg_id_appreg: 1 }); app_build_config_mst.index({ appbuild_platform_id_sygms: 1 }); app_build_config_mst.index({ appbuild_build_type_id_sygms: 1 }); app_build_config_mst.index({ appbuild_is_active: 1 }); var CAppBuildConfigMst = mongoose_1.default.model("app_build_config_mst", app_build_config_mst); exports.CAppBuildConfigMst = CAppBuildConfigMst;