@brimble/models 1.4.15 → 1.4.16
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/logs.d.ts +2 -2
- package/dist/logs.js +3 -1
- package/dist/project.d.ts +2 -2
- package/dist/project.js +3 -1
- package/dist/user.d.ts +2 -3
- package/dist/user.js +4 -1
- package/logs.ts +5 -1
- package/package.json +1 -1
- package/project.ts +5 -1
- package/user.ts +5 -1
package/dist/logs.d.ts
CHANGED
package/dist/logs.js
CHANGED
|
@@ -22,4 +22,6 @@ const LogSchema = new mongoose_1.Schema({
|
|
|
22
22
|
startTime: mongoose_1.Schema.Types.Date,
|
|
23
23
|
endTime: mongoose_1.Schema.Types.Date,
|
|
24
24
|
}, { timestamps: true });
|
|
25
|
-
|
|
25
|
+
const Log = (0, mongoose_1.model)("Log", LogSchema);
|
|
26
|
+
Log.ensureIndexes({ _id: 1, project: 1 });
|
|
27
|
+
exports.default = Log;
|
package/dist/project.d.ts
CHANGED
package/dist/project.js
CHANGED
|
@@ -69,4 +69,6 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
69
69
|
},
|
|
70
70
|
screenshot: String,
|
|
71
71
|
}, { timestamps: true });
|
|
72
|
-
|
|
72
|
+
const Project = (0, mongoose_1.model)("Project", projectSchema);
|
|
73
|
+
Project.ensureIndexes({ _id: 1, updatedAt: 1, createdAt: 1 });
|
|
74
|
+
exports.default = Project;
|
package/dist/user.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="mongoose" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export default _default;
|
|
2
|
+
declare const User: import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>;
|
|
3
|
+
export default User;
|
package/dist/user.js
CHANGED
|
@@ -54,4 +54,7 @@ const userSchema = new mongoose_1.Schema({
|
|
|
54
54
|
type: String,
|
|
55
55
|
},
|
|
56
56
|
}, { timestamps: true });
|
|
57
|
-
|
|
57
|
+
const User = (0, mongoose_1.model)("User", userSchema);
|
|
58
|
+
// Create indexes for _id and email
|
|
59
|
+
User.ensureIndexes({ _id: 1, email: 1 });
|
|
60
|
+
exports.default = User;
|
package/logs.ts
CHANGED
package/package.json
CHANGED
package/project.ts
CHANGED
|
@@ -73,4 +73,8 @@ const projectSchema = new Schema(
|
|
|
73
73
|
{ timestamps: true },
|
|
74
74
|
);
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
const Project = model<IProject>("Project", projectSchema);
|
|
77
|
+
|
|
78
|
+
Project.ensureIndexes({ _id: 1, updatedAt: 1, createdAt: 1 });
|
|
79
|
+
|
|
80
|
+
export default Project;
|
package/user.ts
CHANGED
|
@@ -58,5 +58,9 @@ const userSchema: Schema = new Schema(
|
|
|
58
58
|
},
|
|
59
59
|
{ timestamps: true },
|
|
60
60
|
);
|
|
61
|
+
const User = model("User", userSchema);
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
// Create indexes for _id and email
|
|
64
|
+
User.ensureIndexes({ _id: 1, email: 1 });
|
|
65
|
+
|
|
66
|
+
export default User;
|