@lyxa.ai/core 1.0.321 → 1.0.323
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/libraries/mongo/models/default-chat.model.js +1 -1
- package/dist/libraries/mongo/models/default-chat.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/support-reason-info.model.js +1 -1
- package/dist/libraries/mongo/models/embedded/support-reason-info.model.js.map +1 -1
- package/dist/libraries/mongo/models/professional.model.d.ts +1 -1
- package/dist/libraries/mongo/models/professional.model.js +3 -3
- package/dist/libraries/mongo/models/professional.model.js.map +1 -1
- package/dist/libraries/mongo/models/review.model.js +4 -2
- package/dist/libraries/mongo/models/review.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-order.model.d.ts +1 -1
- package/dist/libraries/mongo/models/service-order.model.js +2 -2
- package/dist/libraries/mongo/models/service-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/support-reason.model.js +2 -1
- package/dist/libraries/mongo/models/support-reason.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ let DefaultChat = class DefaultChat extends defaultClasses_1.TimeStamps {
|
|
|
17
17
|
};
|
|
18
18
|
exports.DefaultChat = DefaultChat;
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
20
|
+
(0, typegoose_1.prop)({ required: true, type: String, unique: true }),
|
|
21
21
|
__metadata("design:type", String)
|
|
22
22
|
], DefaultChat.prototype, "text", void 0);
|
|
23
23
|
exports.DefaultChat = DefaultChat = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-chat.model.js","sourceRoot":"/","sources":["libraries/mongo/models/default-chat.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AAG9D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,IAAI,CAAS;CACpB,CAAA;AAHY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"default-chat.model.js","sourceRoot":"/","sources":["libraries/mongo/models/default-chat.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AAG9D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,IAAI,CAAS;CACpB,CAAA;AAHY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;yCACjC;sBAFR,WAAW;IADvB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACrE,WAAW,CAGvB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\n\n@modelOptions({ schemaOptions: { collection: 'default-chat', timestamps: true } })\nexport class DefaultChat extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic text: string;\n}\n"]}
|
|
@@ -17,7 +17,7 @@ class SupportReasonInfo {
|
|
|
17
17
|
}
|
|
18
18
|
exports.SupportReasonInfo = SupportReasonInfo;
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, typegoose_1.prop)({ type: String, maxlength: 200 }),
|
|
20
|
+
(0, typegoose_1.prop)({ type: String, maxlength: 200, trim: true }),
|
|
21
21
|
__metadata("design:type", String)
|
|
22
22
|
], SupportReasonInfo.prototype, "question", void 0);
|
|
23
23
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-reason-info.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/support-reason-info.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,iBAAiB;IAEtB,QAAQ,CAAU;IAGlB,MAAM,CAAU;CACvB;AAND,8CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"support-reason-info.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/support-reason-info.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,iBAAiB;IAEtB,QAAQ,CAAU;IAGlB,MAAM,CAAU;CACvB;AAND,8CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;mDAC1B;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;iDAChB","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class SupportReasonInfo {\n\t@prop({ type: String, maxlength: 200, trim: true })\n\tpublic question?: string;\n\n\t@prop({ type: String, maxlength: 200 })\n\tpublic answer?: string;\n}\n"]}
|
|
@@ -24,7 +24,7 @@ let Professional = class Professional {
|
|
|
24
24
|
nationality;
|
|
25
25
|
vendor;
|
|
26
26
|
worksOn;
|
|
27
|
-
|
|
27
|
+
avgRating;
|
|
28
28
|
status;
|
|
29
29
|
};
|
|
30
30
|
exports.Professional = Professional;
|
|
@@ -61,9 +61,9 @@ __decorate([
|
|
|
61
61
|
__metadata("design:type", Array)
|
|
62
62
|
], Professional.prototype, "worksOn", void 0);
|
|
63
63
|
__decorate([
|
|
64
|
-
(0, typegoose_1.prop)({ default: 0 }),
|
|
64
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
65
65
|
__metadata("design:type", Number)
|
|
66
|
-
], Professional.prototype, "
|
|
66
|
+
], Professional.prototype, "avgRating", void 0);
|
|
67
67
|
__decorate([
|
|
68
68
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
69
69
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"professional.model.js","sourceRoot":"/","sources":["libraries/mongo/models/professional.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,iDAAwC;AACxC,mEAAyD;AACzD,kDAAqE;AACrE,0DAA2D;
|
|
1
|
+
{"version":3,"file":"professional.model.js","sourceRoot":"/","sources":["libraries/mongo/models/professional.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,iDAAwC;AACxC,mEAAyD;AACzD,kDAAqE;AACrE,0DAA2D;AASpD,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEjB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,WAAW,CAAU;IAGrB,MAAM,CAAe;IAGrB,OAAO,CAAyB;IAGhC,SAAS,CAAU;IAGnB,MAAM,CAAU;CACvB,CAAA;AA9BY,oCAAY;AAEjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;0CAChB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACH;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;iDACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;2CACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACE;AAGlB;IADN,IAAA,gBAAI,GAAE;;iDACqB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;6CACV;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CACT;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;4CACtD;uBA7BX,YAAY;IAPxB,IAAA,eAAG,EAAe,MAAM,EAAE,KAAK,WAAW,IAAI;QAC9C,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACtE,YAAY,CA8BxB","sourcesContent":["import { prop, Ref, modelOptions, pre } from '@typegoose/typegoose';\nimport { Vendor } from './vendor.model';\nimport { ServicePackage } from './service-package.model';\nimport { ProfessionalStatus, Status } from '../../../utilities/enum';\nimport { hashPassword } from '../../../utilities/password';\n\n@pre<Professional>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@modelOptions({ schemaOptions: { collection: 'professionals', timestamps: true } })\nexport class Professional {\n\t@prop({ required: true, trim: true })\n\tpublic name!: string;\n\n\t@prop({ required: true })\n\tpublic image!: string;\n\n\t@prop({ required: true, unique: true })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, unique: true })\n\tpublic email!: string;\n\n\t@prop({ type: String })\n\tpublic password!: string;\n\n\t@prop()\n\tpublic nationality?: string;\n\n\t@prop({ ref: () => Vendor, required: true })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ ref: () => ServicePackage, default: [] })\n\tpublic worksOn!: Ref<ServicePackage>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic avgRating?: number;\n\n\t@prop({ required: true, type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status!: Status;\n}\n"]}
|
|
@@ -42,7 +42,7 @@ __decorate([
|
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], Review.prototype, "description", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
(0, typegoose_1.prop)({ type: () => [String] }),
|
|
45
|
+
(0, typegoose_1.prop)({ type: () => [String], default: [] }),
|
|
46
46
|
__metadata("design:type", Array)
|
|
47
47
|
], Review.prototype, "tags", void 0);
|
|
48
48
|
__decorate([
|
|
@@ -56,6 +56,8 @@ __decorate([
|
|
|
56
56
|
exports.Review = Review = __decorate([
|
|
57
57
|
(0, typegoose_1.modelOptions)({
|
|
58
58
|
schemaOptions: { collection: 'reviews', discriminatorKey: 'reviewType' },
|
|
59
|
-
})
|
|
59
|
+
}),
|
|
60
|
+
(0, typegoose_1.index)({ order: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } }),
|
|
61
|
+
(0, typegoose_1.index)({ serviceOrder: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })
|
|
60
62
|
], Review);
|
|
61
63
|
//# sourceMappingURL=review.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.model.ts"],"names":[],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BAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE;KACxE,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAClG,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GAC7F,MAAM,CAqBlB","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({ order: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ serviceOrder: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\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"]}
|
|
@@ -24,7 +24,7 @@ export declare class ServiceOrder {
|
|
|
24
24
|
hoursRequired?: number;
|
|
25
25
|
userNotes?: string;
|
|
26
26
|
vendorNotes?: string;
|
|
27
|
-
|
|
27
|
+
professional?: Ref<Professional>;
|
|
28
28
|
serviceTimer?: ServiceTimer;
|
|
29
29
|
flag?: ServiceOrderFlag;
|
|
30
30
|
confirmedAt?: Date;
|
|
@@ -36,7 +36,7 @@ let ServiceOrder = class ServiceOrder {
|
|
|
36
36
|
hoursRequired;
|
|
37
37
|
userNotes;
|
|
38
38
|
vendorNotes;
|
|
39
|
-
|
|
39
|
+
professional;
|
|
40
40
|
serviceTimer;
|
|
41
41
|
flag;
|
|
42
42
|
confirmedAt;
|
|
@@ -105,7 +105,7 @@ __decorate([
|
|
|
105
105
|
__decorate([
|
|
106
106
|
(0, typegoose_1.prop)({ ref: () => professional_model_1.Professional }),
|
|
107
107
|
__metadata("design:type", Object)
|
|
108
|
-
], ServiceOrder.prototype, "
|
|
108
|
+
], ServiceOrder.prototype, "professional", void 0);
|
|
109
109
|
__decorate([
|
|
110
110
|
(0, typegoose_1.prop)({ type: () => service_timer_model_1.ServiceTimer }),
|
|
111
111
|
__metadata("design:type", service_timer_model_1.ServiceTimer)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,6CAAoC;AACpC,iDAAwC;AAExC,kDAAiI;AACjI,6DAAoD;AACpD,wEAA8D;AAC9D,kFAAuE;AACvE,6DAAmD;AACnD,oFAA0E;AAC1E,wFAA6E;AAC7E,oFAA0E;AAC1E,4EAA8E;AAC9E,mDAA0C;AAOnC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEd,OAAO,CAAS;IAGhB,OAAO,CAAe;IAGtB,IAAI,CAAY;IAGhB,MAAM,CAAc;IAGpB,IAAI,CAAmB;IAG9B,MAAM,CAAqB;IAGpB,QAAQ,CAAuB;IAG/B,QAAQ,CAAO;IAGf,MAAM,CAAO;IAGb,aAAa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E;YACX,UAAU,EAAE,cAAc;SAC7B;KACJ,CAAC;GACW,YAAY,CAoFxB","sourcesContent":["import { modelOptions, prop, Ref } from \"@typegoose/typegoose\";\nimport { User } from \"./user.model\";\nimport { Vendor } from \"./vendor.model\";\nimport { ServicePackage } from \"./service-package.model\";\nimport { ServiceOrderRecurrencePattern, PaymentMethod, ServiceOrderPriority, ServiceOrderStatus } from \"../../../utilities/enum\";\nimport { Professional } from \"./professional.model\";\nimport { ServiceTimer } from \"./embedded/service-timer.model\";\nimport { ServiceOrderFlag } from \"./embedded/service-order-flag.model\";\nimport { ServiceCart } from \"./service-cart.model\";\nimport { PaymentInformation } from \"./embedded/payment-infromation.model\";\nimport { ServiceOrderFinance } from \"./embedded/service-order-finance.model\";\nimport { ServiceOrderCancel } from \"./embedded/service-order-cance.model\";\nimport { ServiceOrderStatusTimeline } from \"./embedded/status-timeline.model\";\nimport { Service } from \"./service.model\";\n\n@modelOptions({\n schemaOptions: {\n collection: \"serviceOrder\"\n }\n})\nexport class ServiceOrder {\n @prop({ type: String, required: true, unique: true })\n public orderId!: string\n\n @prop({ ref: () => Service, required: true })\n public service!: Ref<Service>\n\n @prop({ ref: () => User, required: true })\n public user!: Ref<User>\n\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>\n\n @prop({ ref: () => ServiceCart, required: true })\n public cart!: Ref<ServiceCart>\n\n @prop({ enum: ServiceOrderStatus, default: ServiceOrderStatus.PENDING })\n status!: ServiceOrderStatus\n\n @prop({ enum: ServiceOrderPriority, default: ServiceOrderPriority.NORMAL })\n public priority!: ServiceOrderPriority\n\n @prop({ required: true })\n public timeFrom!: Date\n\n @prop({ required: true })\n public timeTo!: Date\n\n @prop({ type: Number })\n public hoursRequired?: number;\n\n @prop({ type: String })\n public userNotes?: string;\n\n @prop({ type: String })\n public vendorNotes?: string;\n\n @prop({ ref: () => Professional })\n public professional?: Ref<Professional>\n\n @prop({ type: () => ServiceTimer })\n public serviceTimer?: ServiceTimer\n\n @prop({ type: () => ServiceOrderFlag })\n public flag?: ServiceOrderFlag\n\n @prop()\n public confirmedAt?: Date;\n\n @prop()\n public autoConfirmedAt?: Date;\n\n @prop({ default: false })\n public isUrgent!: boolean;\n\n @prop()\n public urgentAt?: Date;\n\n @prop({ default: false })\n public isOverdue!: boolean;\n\n @prop()\n public overdueAt?: Date;\n\n @prop({ required: true, type: ServiceOrderFinance })\n public finance: ServiceOrderFinance\n\n @prop({ enum: ServiceOrderRecurrencePattern, default: ServiceOrderRecurrencePattern.ONETIME })\n public recurrencePattern?: ServiceOrderRecurrencePattern\n\n @prop({ default: false })\n public isPaid!: boolean;\n\n @prop({ enum: PaymentMethod, type: String })\n public paymentMethod?: PaymentMethod;\n\n @prop({ type: () => PaymentInformation })\n public paymentInformation?: PaymentInformation;\n\n @prop({ type: () => ServiceOrderCancel })\n public orderCancel?: ServiceOrderCancel;\n\n @prop({ type: () => [ServiceOrderStatusTimeline], default: [] })\n public statusTimeline: ServiceOrderStatusTimeline[];\n}"]}
|
|
@@ -50,6 +50,7 @@ exports.SupportReason = SupportReason = __decorate([
|
|
|
50
50
|
(0, typegoose_1.pre)('findOneAndUpdate', async function (next) {
|
|
51
51
|
await sortingOrderHooks_1.handlePreUpdateForSortingWithStatus.call(this, _1.SupportReasonModel, ['reasonType']);
|
|
52
52
|
next();
|
|
53
|
-
})
|
|
53
|
+
}),
|
|
54
|
+
(0, typegoose_1.index)({ reasonType: 1, "reason.question": 1 }, { unique: true })
|
|
54
55
|
], SupportReason);
|
|
55
56
|
//# sourceMappingURL=support-reason.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-reason.model.js","sourceRoot":"/","sources":["libraries/mongo/models/support-reason.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"support-reason.model.js","sourceRoot":"/","sources":["libraries/mongo/models/support-reason.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,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AE,UAAU,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACpD,aAAa,CAYzB","sourcesContent":["import { index, modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status, SupportReasonTypeEnum } from '../../../utilities/enum';\nimport { SupportReasonInfo } from './embedded/support-reason-info.model';\nimport { Query } from 'mongoose';\nimport { SupportReasonModel } from '.';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sortingOrderHooks';\n\n@modelOptions({ schemaOptions: { collection: 'supportReasons' } })\n@pre<SupportReason>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, SupportReasonModel, {\n\t\treasonType: this.reasonType,\n\t});\n\n\tnext();\n})\n@pre<SupportReason>('findOneAndUpdate', async function (this: Query<any, SupportReason>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, SupportReasonModel, ['reasonType']);\n\n\tnext();\n})\n\n@index({ reasonType: 1, \"reason.question\": 1 }, { unique: true })\nexport class SupportReason extends TimeStamps {\n\t@prop({ required: true, type: () => SupportReasonInfo })\n\tpublic reason: SupportReasonInfo;\n\n\t@prop({ required: true, type: String, enum: SupportReasonTypeEnum })\n\tpublic reasonType: SupportReasonTypeEnum;\n\n\t@prop({ required: true, type: String, enum: Status })\n\tpublic status: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED