codebase-models 2.1.0 → 2.1.2
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.
- package/dist/src/models/Page.js +1 -2
- package/package.json +1 -1
- package/src/models/Page.ts +1 -2
package/dist/src/models/Page.js
CHANGED
|
@@ -42,7 +42,6 @@ mongoose_1.default.plugin(mongoose_slug_updater_1.default);
|
|
|
42
42
|
const UrltargetingsSchema = new mongoose_1.Schema({
|
|
43
43
|
iid: {
|
|
44
44
|
type: String,
|
|
45
|
-
required: true,
|
|
46
45
|
trim: true,
|
|
47
46
|
},
|
|
48
47
|
type: {
|
|
@@ -150,7 +149,7 @@ PageSchema.pre('save', function (next) {
|
|
|
150
149
|
});
|
|
151
150
|
PageSchema.index({ iid: 1 }, { unique: true });
|
|
152
151
|
// Compound indexes for common query patterns
|
|
153
|
-
PageSchema.index({ client: 1,
|
|
152
|
+
PageSchema.index({ client: 1, api_name: 1 }, { unique: true });
|
|
154
153
|
PageSchema.index({ client: 1, isActive: 1 });
|
|
155
154
|
PageSchema.index({ organizationId: 1, client: 1 });
|
|
156
155
|
PageSchema.index({ organizationId: 1, name: 1 });
|
package/package.json
CHANGED
package/src/models/Page.ts
CHANGED
|
@@ -31,7 +31,6 @@ export interface IPage extends Document {
|
|
|
31
31
|
const UrltargetingsSchema = new Schema<IUrltargetings>({
|
|
32
32
|
iid: {
|
|
33
33
|
type: String,
|
|
34
|
-
required: true,
|
|
35
34
|
trim: true,
|
|
36
35
|
},
|
|
37
36
|
type: {
|
|
@@ -143,7 +142,7 @@ PageSchema.pre('save', async function(next) {
|
|
|
143
142
|
|
|
144
143
|
PageSchema.index({ iid: 1 }, { unique: true });
|
|
145
144
|
// Compound indexes for common query patterns
|
|
146
|
-
PageSchema.index({ client: 1,
|
|
145
|
+
PageSchema.index({ client: 1, api_name: 1 }, { unique: true });
|
|
147
146
|
PageSchema.index({ client: 1, isActive: 1 });
|
|
148
147
|
PageSchema.index({ organizationId: 1, client: 1 });
|
|
149
148
|
PageSchema.index({ organizationId: 1, name: 1 });
|