cloud-ide-model-schema 1.1.132 → 1.1.133

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.
@@ -84,7 +84,7 @@ var fee_receipt_template = new mongoose_1.Schema({
84
84
  collection: "fee_receipt_template"
85
85
  });
86
86
  // Indexes
87
- fee_receipt_template.index({ feert_template_code: 1 }, { unique: true, sparse: true });
87
+ // Note: feert_template_code index is automatically created by unique: true
88
88
  fee_receipt_template.index({ feert_entity_id_syen: 1 });
89
89
  fee_receipt_template.index({ feert_template_type: 1 });
90
90
  fee_receipt_template.index({ feert_status: 1 });
@@ -89,7 +89,7 @@ var fee_structure = new mongoose_1.Schema({
89
89
  timestamps: false
90
90
  });
91
91
  // Indexes for performance
92
- fee_structure.index({ fees_structure_code: 1 }, { unique: true, sparse: true });
92
+ // Note: fees_structure_code index is automatically created by unique: true
93
93
  fee_structure.index({ fees_entity_id_syen: 1, fees_academic_year_id_acayr: 1 });
94
94
  fee_structure.index({ fees_class_program_id_acacpm: 1 });
95
95
  fee_structure.index({ fees_entity_id_syen: 1, fees_is_active: 1 });
@@ -8,7 +8,6 @@ var notification = new mongoose_1.Schema({
8
8
  type: mongoose_1.default.Schema.Types.ObjectId,
9
9
  ref: "auth_user_mst",
10
10
  required: true,
11
- index: true,
12
11
  comment: "Target user for notification"
13
12
  },
14
13
  not_type: {
@@ -16,14 +15,12 @@ var notification = new mongoose_1.Schema({
16
15
  enum: ['info', 'success', 'warning', 'error', 'system'],
17
16
  required: true,
18
17
  default: 'info',
19
- index: true,
20
18
  comment: "Notification type"
21
19
  },
22
20
  not_category: {
23
21
  type: String,
24
22
  required: true,
25
23
  maxlength: 50,
26
- index: true,
27
24
  comment: "Notification category"
28
25
  },
29
26
  not_title: {
@@ -57,7 +54,6 @@ var notification = new mongoose_1.Schema({
57
54
  enum: ['pending', 'sent', 'delivered', 'read', 'archived'],
58
55
  required: true,
59
56
  default: 'pending',
60
- index: true,
61
57
  comment: "Notification status"
62
58
  },
63
59
  not_read_at: {
@@ -94,7 +90,6 @@ var notification = new mongoose_1.Schema({
94
90
  enum: ['low', 'normal', 'high', 'urgent'],
95
91
  required: true,
96
92
  default: 'normal',
97
- index: true,
98
93
  comment: "Notification priority"
99
94
  },
100
95
  not_expires_at: {
@@ -109,7 +104,6 @@ var notification = new mongoose_1.Schema({
109
104
  not_created_at: {
110
105
  type: Date,
111
106
  default: Date.now,
112
- index: true,
113
107
  comment: "Creation timestamp"
114
108
  },
115
109
  not_updated_at: {
@@ -122,13 +116,17 @@ var notification = new mongoose_1.Schema({
122
116
  collection: 'notifications'
123
117
  });
124
118
  // Indexes for performance
125
- notification.index({ not_id_user: 1, not_status: 1 });
126
- notification.index({ not_id_user: 1, not_created_at: -1 });
119
+ // Single field indexes
120
+ notification.index({ not_id_user: 1 });
127
121
  notification.index({ not_type: 1 });
128
122
  notification.index({ not_category: 1 });
129
123
  notification.index({ not_priority: 1 });
124
+ notification.index({ not_status: 1 });
125
+ notification.index({ not_created_at: -1 }); // Descending for recent-first queries
126
+ // Compound indexes for common query patterns
127
+ notification.index({ not_id_user: 1, not_status: 1 });
128
+ notification.index({ not_id_user: 1, not_created_at: -1 });
130
129
  notification.index({ not_status: 1, not_created_at: -1 });
131
- // Compound index for common queries
132
130
  notification.index({
133
131
  not_id_user: 1,
134
132
  not_status: 1,
@@ -9,7 +9,6 @@ var notification_preference = new mongoose_1.Schema({
9
9
  ref: "auth_user_mst",
10
10
  required: true,
11
11
  unique: true,
12
- index: true,
13
12
  comment: "User reference"
14
13
  },
15
14
  npref_channels: {
@@ -116,7 +115,6 @@ var notification_preference = new mongoose_1.Schema({
116
115
  timestamps: { createdAt: 'npref_created_at', updatedAt: 'npref_updated_at' },
117
116
  collection: 'notification_preferences'
118
117
  });
119
- // Unique index on user_id
120
- notification_preference.index({ npref_id_user: 1 }, { unique: true });
118
+ // Note: npref_id_user index is automatically created by unique: true
121
119
  var CNotificationPreference = mongoose_1.default.model("notification_preference", notification_preference);
122
120
  exports.CNotificationPreference = CNotificationPreference;
@@ -9,7 +9,6 @@ var notification_template = new mongoose_1.Schema({
9
9
  required: true,
10
10
  unique: true,
11
11
  maxlength: 100,
12
- index: true,
13
12
  comment: "Unique template identifier"
14
13
  },
15
14
  ntemp_template_type: {
@@ -23,7 +22,6 @@ var notification_template = new mongoose_1.Schema({
23
22
  type: String,
24
23
  required: true,
25
24
  maxlength: 50,
26
- index: true,
27
25
  comment: "Notification category"
28
26
  },
29
27
  ntemp_subject: {
@@ -62,7 +60,6 @@ var notification_template = new mongoose_1.Schema({
62
60
  ntemp_is_active: {
63
61
  type: Boolean,
64
62
  default: true,
65
- index: true,
66
63
  comment: "Template active status"
67
64
  },
68
65
  ntemp_created_at: {
@@ -80,7 +77,7 @@ var notification_template = new mongoose_1.Schema({
80
77
  collection: 'notification_templates'
81
78
  });
82
79
  // Indexes
83
- notification_template.index({ ntemp_template_name: 1 }, { unique: true });
80
+ // Note: ntemp_template_name index is automatically created by unique: true
84
81
  notification_template.index({ ntemp_category: 1 });
85
82
  notification_template.index({ ntemp_is_active: 1 });
86
83
  var CNotificationTemplate = mongoose_1.default.model("notification_template", notification_template);
@@ -69,6 +69,6 @@ var api_keys = new mongoose_1.Schema({
69
69
  // Indexes
70
70
  api_keys.index({ akey_name: 1 });
71
71
  api_keys.index({ akey_status: 1 });
72
- api_keys.index({ akey_api_key: 1 });
72
+ // Note: akey_api_key index is automatically created by unique: true
73
73
  var CApiKey = mongoose_1.default.model("api_keys", api_keys);
74
74
  exports.CApiKey = CApiKey;
@@ -83,7 +83,7 @@ var backup_jobs = new mongoose_1.Schema({
83
83
  }
84
84
  }, { collection: 'backup_jobs', timestamps: { createdAt: 'bjob_created_at', updatedAt: 'bjob_updated_at' } });
85
85
  // Indexes
86
- backup_jobs.index({ bjob_name: 1 });
86
+ // Note: bjob_name index is automatically created by unique: true
87
87
  backup_jobs.index({ bjob_status: 1 });
88
88
  backup_jobs.index({ bjob_backup_type: 1 });
89
89
  backup_jobs.index({ bjob_backup_policy_id: 1 });
@@ -62,7 +62,7 @@ var backup_policies = new mongoose_1.Schema({
62
62
  }
63
63
  }, { collection: 'backup_policies', timestamps: { createdAt: 'bpol_created_at', updatedAt: 'bpol_updated_at' } });
64
64
  // Indexes
65
- backup_policies.index({ bpol_name: 1 });
65
+ // Note: bpol_name index is automatically created by unique: true
66
66
  backup_policies.index({ bpol_isactive: 1 });
67
67
  var CBackupPolicy = mongoose_1.default.model("backup_policies", backup_policies);
68
68
  exports.CBackupPolicy = CBackupPolicy;
@@ -47,7 +47,7 @@ var subscription_features = new mongoose_1.Schema({
47
47
  }
48
48
  }, { collection: 'subscription_features', timestamps: { createdAt: 'sfea_created_at', updatedAt: 'sfea_updated_at' } });
49
49
  // Indexes
50
- subscription_features.index({ sfea_code: 1 });
50
+ // Note: sfea_code index is automatically created by unique: true
51
51
  subscription_features.index({ sfea_category: 1 });
52
52
  var CSubscriptionFeature = mongoose_1.default.model("subscription_features", subscription_features);
53
53
  exports.CSubscriptionFeature = CSubscriptionFeature;
@@ -86,7 +86,7 @@ var subscription_plans = new mongoose_1.Schema({
86
86
  }
87
87
  }, { collection: 'subscription_plans', timestamps: { createdAt: 'spln_created_at', updatedAt: 'spln_updated_at' } });
88
88
  // Indexes
89
- subscription_plans.index({ spln_code: 1 });
89
+ // Note: spln_code index is automatically created by unique: true
90
90
  subscription_plans.index({ spln_is_active: 1 });
91
91
  subscription_plans.index({ spln_billing_cycle: 1 });
92
92
  var CSubscriptionPlan = mongoose_1.default.model("subscription_plans", subscription_plans);
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript": "^5.8.3"
10
10
  },
11
11
  "name": "cloud-ide-model-schema",
12
- "version": "1.1.132",
12
+ "version": "1.1.133",
13
13
  "description": "Pachage for schema management of Cloud IDEsys LMS",
14
14
  "main": "lib/index.js",
15
15
  "types": "lib/index.d.ts",