cloud-ide-model-schema 1.1.129 → 1.1.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import { CoreUserTypeMapping } from "cloud-ide-lms-model";
2
+ import mongoose from "mongoose";
3
+ declare const CCoreUserTypeMapping: mongoose.Model<CoreUserTypeMapping, {}, {}, {}, mongoose.Document<unknown, {}, CoreUserTypeMapping, {}> & CoreUserTypeMapping & Required<{
4
+ _id: string;
5
+ }> & {
6
+ __v: number;
7
+ }, any>;
8
+ export { CCoreUserTypeMapping };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CCoreUserTypeMapping = void 0;
4
+ var mongoose_1 = require("mongoose");
5
+ /* SCHEMA START */
6
+ var core_user_type_mapping = new mongoose_1.Schema({
7
+ syutm_user_id_auth: {
8
+ type: mongoose_1.default.Schema.Types.ObjectId,
9
+ ref: "auth_user_mst",
10
+ required: true,
11
+ comment: "Reference to auth_user_mst - the actual user account"
12
+ },
13
+ syutm_user_type: {
14
+ type: String,
15
+ required: true,
16
+ maxlength: 50,
17
+ trim: true,
18
+ enum: ["STUDENT", "EMPLOYEE", "TEACHER", "PARENT", "GUARDIAN", "ADMIN", "STAFF", "OTHER"],
19
+ comment: "Type of user (STUDENT, EMPLOYEE, TEACHER, etc.)"
20
+ },
21
+ syutm_type_specific_id: {
22
+ type: String,
23
+ required: true,
24
+ maxlength: 50,
25
+ trim: true,
26
+ comment: "Type-specific ID (e.g., STU2025000001, EMP001, TCH001)"
27
+ },
28
+ syutm_entity_id_syen: {
29
+ type: mongoose_1.default.Schema.Types.ObjectId,
30
+ ref: "core_system_entity",
31
+ comment: "Reference to core_system_entity (for multi-entity/multi-industry support)"
32
+ },
33
+ syutm_reference_table: {
34
+ type: String,
35
+ maxlength: 100,
36
+ trim: true,
37
+ comment: "Name of the reference table (e.g., admission_application_main, employee_master)"
38
+ },
39
+ syutm_reference_id: {
40
+ type: mongoose_1.default.Schema.Types.ObjectId,
41
+ comment: "ObjectId of the record in the reference table"
42
+ },
43
+ syutm_isactive: {
44
+ type: Boolean,
45
+ default: true,
46
+ comment: "Active status of the mapping"
47
+ },
48
+ syutm_created_date: {
49
+ type: Date,
50
+ default: Date.now,
51
+ comment: "Creation timestamp"
52
+ },
53
+ syutm_modified_date: {
54
+ type: Date,
55
+ default: Date.now,
56
+ comment: "Last modification timestamp"
57
+ },
58
+ syutm_created_by_user: {
59
+ type: mongoose_1.default.Schema.Types.ObjectId,
60
+ ref: "auth_user_mst",
61
+ comment: "User who created this mapping"
62
+ },
63
+ syutm_modified_by_user: {
64
+ type: mongoose_1.default.Schema.Types.ObjectId,
65
+ ref: "auth_user_mst",
66
+ comment: "User who last modified this mapping"
67
+ }
68
+ }, {
69
+ collection: 'core_user_type_mapping',
70
+ timestamps: false // We're using custom timestamp fields
71
+ });
72
+ // Indexes for performance
73
+ core_user_type_mapping.index({ syutm_user_id_auth: 1 });
74
+ core_user_type_mapping.index({ syutm_user_type: 1 });
75
+ core_user_type_mapping.index({ syutm_type_specific_id: 1 });
76
+ core_user_type_mapping.index({ syutm_entity_id_syen: 1 });
77
+ core_user_type_mapping.index({ syutm_reference_table: 1, syutm_reference_id: 1 });
78
+ // Unique compound index: one type-specific ID per user type per entity
79
+ core_user_type_mapping.index({
80
+ syutm_type_specific_id: 1,
81
+ syutm_user_type: 1,
82
+ syutm_entity_id_syen: 1
83
+ }, { unique: true, sparse: true });
84
+ var CCoreUserTypeMapping = mongoose_1.default.model("core_user_type_mapping", core_user_type_mapping);
85
+ exports.CCoreUserTypeMapping = CCoreUserTypeMapping;
@@ -29,6 +29,7 @@ import { CCoreUserFamilyDetails } from './core_user_family_details';
29
29
  import { CCoreUserRole } from './core_user_role';
30
30
  import { CCoreUserRoleRights } from './core_user_role_rights';
31
31
  import { CCoreUserRoleExceptions } from './core_user_role_exceptions';
32
+ import { CCoreUserTypeMapping } from './core_user_type_mapping';
32
33
  import { CCoreEducationBoard } from './core_education_board';
33
34
  import { CCoreSchoolBoardAffiliation } from './core_school_board_affiliation';
34
35
  import { CCoreEntityUdise } from './core_entity_udise';
@@ -74,4 +75,6 @@ CCoreEntityUdise,
74
75
  /** Board Exam Pattern schemas */
75
76
  CCoreBoardExamPattern,
76
77
  /** Board Grade System schemas */
77
- CCoreBoardGradeSystem };
78
+ CCoreBoardGradeSystem,
79
+ /** User Type Mapping schemas */
80
+ CCoreUserTypeMapping };
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.CCoreBoardGradeSystem = exports.CCoreBoardExamPattern = exports.CCoreEntityUdise = exports.CCoreSchoolBoardAffiliation = exports.CCoreEducationBoard = exports.CCoreUserRoleExceptions = exports.CCoreUserRoleRights = exports.CCoreUserRole = exports.CCoreUserFamilyDetails = exports.CCoreUserDocuments = exports.CCoreSydept = exports.CCoreSydsgl = exports.CCoreSydsg = exports.CCoreSycr = exports.CCoreSypn = exports.CCoreSyoth = exports.CCoreSyupth = exports.CCoreSyth = exports.CCoreSylang = exports.CCoreSynat = exports.CCoreSyctr = exports.CCoreCyfm = exports.CCoreSyenm = exports.CCoreSygmt = exports.CCoreSygms = exports.CCoreSype = exports.CCoreSypgr = exports.CCoreSyptb = exports.CCoreSypin = exports.CCoreFinancialConfig = exports.CCoreSyco = exports.CCoreSyen = exports.CCoreSylog = exports.CCoreSyme = exports.CCoreSytm = exports.CCoreSypg = void 0;
17
+ exports.CCoreUserTypeMapping = exports.CCoreBoardGradeSystem = exports.CCoreBoardExamPattern = exports.CCoreEntityUdise = exports.CCoreSchoolBoardAffiliation = exports.CCoreEducationBoard = exports.CCoreUserRoleExceptions = exports.CCoreUserRoleRights = exports.CCoreUserRole = exports.CCoreUserFamilyDetails = exports.CCoreUserDocuments = exports.CCoreSydept = exports.CCoreSydsgl = exports.CCoreSydsg = exports.CCoreSycr = exports.CCoreSypn = exports.CCoreSyoth = exports.CCoreSyupth = exports.CCoreSyth = exports.CCoreSylang = exports.CCoreSynat = exports.CCoreSyctr = exports.CCoreCyfm = exports.CCoreSyenm = exports.CCoreSygmt = exports.CCoreSygms = exports.CCoreSype = exports.CCoreSypgr = exports.CCoreSyptb = exports.CCoreSypin = exports.CCoreFinancialConfig = exports.CCoreSyco = exports.CCoreSyen = exports.CCoreSylog = exports.CCoreSyme = exports.CCoreSytm = exports.CCoreSypg = void 0;
18
18
  var core_system_pages_1 = require("./core_system_pages");
19
19
  Object.defineProperty(exports, "CCoreSypg", { enumerable: true, get: function () { return core_system_pages_1.CCoreSypg; } });
20
20
  var core_system_pages_theme_1 = require("./core_system_pages_theme");
@@ -77,6 +77,8 @@ var core_user_role_rights_1 = require("./core_user_role_rights");
77
77
  Object.defineProperty(exports, "CCoreUserRoleRights", { enumerable: true, get: function () { return core_user_role_rights_1.CCoreUserRoleRights; } });
78
78
  var core_user_role_exceptions_1 = require("./core_user_role_exceptions");
79
79
  Object.defineProperty(exports, "CCoreUserRoleExceptions", { enumerable: true, get: function () { return core_user_role_exceptions_1.CCoreUserRoleExceptions; } });
80
+ var core_user_type_mapping_1 = require("./core_user_type_mapping");
81
+ Object.defineProperty(exports, "CCoreUserTypeMapping", { enumerable: true, get: function () { return core_user_type_mapping_1.CCoreUserTypeMapping; } });
80
82
  var core_education_board_1 = require("./core_education_board");
81
83
  Object.defineProperty(exports, "CCoreEducationBoard", { enumerable: true, get: function () { return core_education_board_1.CCoreEducationBoard; } });
82
84
  var core_school_board_affiliation_1 = require("./core_school_board_affiliation");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "dependencies": {
3
- "cloud-ide-lms-model": "^1.0.340",
3
+ "cloud-ide-lms-model": "^1.0.354",
4
4
  "dotenv": "^16.5.0",
5
5
  "mongoose": "^8.15.0"
6
6
  },
@@ -9,7 +9,7 @@
9
9
  "typescript": "^5.8.3"
10
10
  },
11
11
  "name": "cloud-ide-model-schema",
12
- "version": "1.1.129",
12
+ "version": "1.1.130",
13
13
  "description": "Pachage for schema management of Cloud IDEsys LMS",
14
14
  "main": "lib/index.js",
15
15
  "types": "lib/index.d.ts",