codebase-models 2.1.1 → 2.1.3
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 -1
- package/dist/src/models/User.js +5 -1
- package/package.json +1 -1
- package/src/models/Page.ts +1 -1
- package/src/models/User.ts +9 -3
package/dist/src/models/Page.js
CHANGED
|
@@ -149,7 +149,7 @@ PageSchema.pre('save', function (next) {
|
|
|
149
149
|
});
|
|
150
150
|
PageSchema.index({ iid: 1 }, { unique: true });
|
|
151
151
|
// Compound indexes for common query patterns
|
|
152
|
-
PageSchema.index({ client: 1,
|
|
152
|
+
PageSchema.index({ client: 1, api_name: 1 }, { unique: true });
|
|
153
153
|
PageSchema.index({ client: 1, isActive: 1 });
|
|
154
154
|
PageSchema.index({ organizationId: 1, client: 1 });
|
|
155
155
|
PageSchema.index({ organizationId: 1, name: 1 });
|
package/dist/src/models/User.js
CHANGED
|
@@ -52,13 +52,17 @@ const UserSchema = new mongoose_1.Schema({
|
|
|
52
52
|
type: Boolean,
|
|
53
53
|
default: false,
|
|
54
54
|
},
|
|
55
|
+
resetLink: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: null,
|
|
58
|
+
},
|
|
55
59
|
organizationId: {
|
|
56
60
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
57
61
|
ref: "organization",
|
|
58
62
|
default: null,
|
|
59
63
|
},
|
|
60
64
|
}, {
|
|
61
|
-
timestamps: true
|
|
65
|
+
timestamps: true,
|
|
62
66
|
});
|
|
63
67
|
// Add compound indexes for common query patterns
|
|
64
68
|
UserSchema.index({ organizationId: 1, role: 1 });
|
package/package.json
CHANGED
package/src/models/Page.ts
CHANGED
|
@@ -142,7 +142,7 @@ PageSchema.pre('save', async function(next) {
|
|
|
142
142
|
|
|
143
143
|
PageSchema.index({ iid: 1 }, { unique: true });
|
|
144
144
|
// Compound indexes for common query patterns
|
|
145
|
-
PageSchema.index({ client: 1,
|
|
145
|
+
PageSchema.index({ client: 1, api_name: 1 }, { unique: true });
|
|
146
146
|
PageSchema.index({ client: 1, isActive: 1 });
|
|
147
147
|
PageSchema.index({ organizationId: 1, client: 1 });
|
|
148
148
|
PageSchema.index({ organizationId: 1, name: 1 });
|
package/src/models/User.ts
CHANGED
|
@@ -43,14 +43,20 @@ const UserSchema = new Schema<IUser>({
|
|
|
43
43
|
type: Boolean,
|
|
44
44
|
default: false,
|
|
45
45
|
},
|
|
46
|
+
resetLink: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: null,
|
|
49
|
+
},
|
|
46
50
|
organizationId: {
|
|
47
51
|
type: mongoose.Schema.Types.ObjectId,
|
|
48
52
|
ref: "organization",
|
|
49
53
|
default: null,
|
|
50
54
|
},
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
timestamps: true,
|
|
58
|
+
}
|
|
59
|
+
);
|
|
54
60
|
|
|
55
61
|
// Add compound indexes for common query patterns
|
|
56
62
|
UserSchema.index({ organizationId: 1, role: 1 });
|