@lyxa.ai/core 1.1.27 → 1.1.28
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.
|
@@ -23,6 +23,7 @@ let Review = class Review extends defaultClasses_1.TimeStamps {
|
|
|
23
23
|
tags;
|
|
24
24
|
isVisible;
|
|
25
25
|
deletedBy;
|
|
26
|
+
orderId;
|
|
26
27
|
};
|
|
27
28
|
exports.Review = Review;
|
|
28
29
|
__decorate([
|
|
@@ -53,10 +54,15 @@ __decorate([
|
|
|
53
54
|
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
54
55
|
__metadata("design:type", Object)
|
|
55
56
|
], Review.prototype, "deletedBy", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], Review.prototype, "orderId", void 0);
|
|
56
61
|
exports.Review = Review = __decorate([
|
|
57
62
|
(0, typegoose_1.modelOptions)({
|
|
58
63
|
schemaOptions: { collection: 'reviews', discriminatorKey: 'reviewType' },
|
|
59
64
|
}),
|
|
60
|
-
(0, typegoose_1.index)({ order: 1, serviceOrder: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })
|
|
65
|
+
(0, typegoose_1.index)({ order: 1, serviceOrder: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } }),
|
|
66
|
+
(0, typegoose_1.index)({ orderId: 1 })
|
|
61
67
|
], Review);
|
|
62
68
|
//# sourceMappingURL=review.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,kDAAqD;AACrD,+CAAsC;
|
|
1
|
+
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.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;iBAvBZ,MAAM;IARlB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE;KACxE,CAAC;IACD,IAAA,iBAAK,EACL,EAAE,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAC5C,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC9D;IACA,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACT,MAAM,CAwBlB","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { ReviewType } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'reviews', discriminatorKey: 'reviewType' },\n})\n@index(\n\t{ order: 1, serviceOrder: 1, reviewType: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@index({ orderId: 1 })\nexport class Review extends TimeStamps {\n\t@prop({ required: true, type: String, enum: ReviewType })\n\tpublic reviewType!: ReviewType;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, type: Number, min: 1, max: 5 })\n\tpublic rating!: number;\n\n\t@prop({ type: String })\n\tpublic description?: string;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic tags?: string[];\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible?: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic deletedBy?: Ref<Admin>;\n\n\t@prop({ required: true, type: String }) // to store order and serviceOrder orderId for all type of reviews\n\tpublic orderId!: string;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED