@lyxa.ai/core 1.0.296 → 1.0.298
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/embedded/attribute-item.model.d.ts +0 -1
- package/dist/libraries/mongo/models/embedded/attribute-item.model.js +0 -5
- package/dist/libraries/mongo/models/embedded/attribute-item.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/line-item-attribute.model.d.ts +6 -2
- package/dist/libraries/mongo/models/embedded/line-item-attribute.model.js +20 -3
- package/dist/libraries/mongo/models/embedded/line-item-attribute.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/order-refund.model.d.ts +10 -16
- package/dist/libraries/mongo/models/embedded/order-refund.model.js +10 -36
- package/dist/libraries/mongo/models/embedded/order-refund.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/replacement-order.model.d.ts +15 -14
- package/dist/libraries/mongo/models/embedded/replacement-order.model.js +17 -25
- package/dist/libraries/mongo/models/embedded/replacement-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/flag.model.d.ts +4 -1
- package/dist/libraries/mongo/models/flag.model.js +12 -1
- package/dist/libraries/mongo/models/flag.model.js.map +1 -1
- package/dist/libraries/mongo/models/order.model.d.ts +1 -1
- package/dist/libraries/mongo/models/order.model.js +2 -2
- package/dist/libraries/mongo/models/order.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +0 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.js +0 -5
- package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,6 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
14
14
|
class AttributeItem {
|
|
15
15
|
name;
|
|
16
16
|
price;
|
|
17
|
-
secondaryPrice;
|
|
18
17
|
isVisible;
|
|
19
18
|
}
|
|
20
19
|
exports.AttributeItem = AttributeItem;
|
|
@@ -26,10 +25,6 @@ __decorate([
|
|
|
26
25
|
(0, typegoose_1.prop)({ required: true, type: Number, min: 0, max: 999999999 }),
|
|
27
26
|
__metadata("design:type", Number)
|
|
28
27
|
], AttributeItem.prototype, "price", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typegoose_1.prop)({ type: Number, min: 0 }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], AttributeItem.prototype, "secondaryPrice", void 0);
|
|
33
28
|
__decorate([
|
|
34
29
|
(0, typegoose_1.prop)({ type: Boolean, default: true }),
|
|
35
30
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/attribute-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,aAAa;IAElB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,
|
|
1
|
+
{"version":3,"file":"attribute-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/attribute-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,aAAa;IAElB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,SAAS,CAAW;CAC3B;AATD,sCASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;2CAC7C;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;;4CACzC;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDACZ","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class AttributeItem {\n\t@prop({ required: true, type: String, trim: true, maxlength: 20 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: Number, min: 0, max: 999999999 })\n\tpublic price!: number;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible?: boolean;\n}\n"]}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { Ref } from '@typegoose/typegoose';
|
|
2
2
|
import { Attribute } from '../attribute.model';
|
|
3
|
-
import { AttributeItem } from './attribute-item.model';
|
|
4
3
|
declare class AttributeSnap {
|
|
5
4
|
name: string;
|
|
6
5
|
}
|
|
6
|
+
export declare class SelectedAttributeItem {
|
|
7
|
+
name: string;
|
|
8
|
+
price: number;
|
|
9
|
+
secondaryPrice?: number;
|
|
10
|
+
}
|
|
7
11
|
export declare class LineItemAttribute {
|
|
8
12
|
attribute: Ref<Attribute>;
|
|
9
13
|
attributeSnap?: AttributeSnap;
|
|
10
|
-
selectedItems:
|
|
14
|
+
selectedItems: SelectedAttributeItem[];
|
|
11
15
|
}
|
|
12
16
|
export {};
|
|
@@ -9,10 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LineItemAttribute = void 0;
|
|
12
|
+
exports.LineItemAttribute = exports.SelectedAttributeItem = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const attribute_model_1 = require("../attribute.model");
|
|
15
|
-
const attribute_item_model_1 = require("./attribute-item.model");
|
|
16
15
|
class AttributeSnap {
|
|
17
16
|
name;
|
|
18
17
|
}
|
|
@@ -20,6 +19,24 @@ __decorate([
|
|
|
20
19
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
21
20
|
__metadata("design:type", String)
|
|
22
21
|
], AttributeSnap.prototype, "name", void 0);
|
|
22
|
+
class SelectedAttributeItem {
|
|
23
|
+
name;
|
|
24
|
+
price;
|
|
25
|
+
secondaryPrice;
|
|
26
|
+
}
|
|
27
|
+
exports.SelectedAttributeItem = SelectedAttributeItem;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typegoose_1.prop)({ required: true, type: String, trim: true, maxlength: 20 }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SelectedAttributeItem.prototype, "name", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typegoose_1.prop)({ required: true, type: Number, min: 0, max: 999999999 }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], SelectedAttributeItem.prototype, "price", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typegoose_1.prop)({ type: Number, min: 0 }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], SelectedAttributeItem.prototype, "secondaryPrice", void 0);
|
|
23
40
|
class LineItemAttribute {
|
|
24
41
|
attribute;
|
|
25
42
|
attributeSnap;
|
|
@@ -35,7 +52,7 @@ __decorate([
|
|
|
35
52
|
__metadata("design:type", AttributeSnap)
|
|
36
53
|
], LineItemAttribute.prototype, "attributeSnap", void 0);
|
|
37
54
|
__decorate([
|
|
38
|
-
(0, typegoose_1.prop)({ required: true, type: [
|
|
55
|
+
(0, typegoose_1.prop)({ required: true, type: [SelectedAttributeItem] }),
|
|
39
56
|
__metadata("design:type", Array)
|
|
40
57
|
], LineItemAttribute.prototype, "selectedItems", void 0);
|
|
41
58
|
//# sourceMappingURL=line-item-attribute.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-item-attribute.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/line-item-attribute.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,wDAA+C;
|
|
1
|
+
{"version":3,"file":"line-item-attribute.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/line-item-attribute.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,wDAA+C;AAE/C,MAAM,aAAa;IAEX,IAAI,CAAU;CACrB;AADO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CAClB;AAGtB,MAAa,qBAAqB;IAE1B,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,cAAc,CAAU;CAC/B;AATD,sDASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;mDAC7C;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;;oDACzC;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;6DACA;AAGhC,MAAa,iBAAiB;IAEtB,SAAS,CAAkB;IAG3B,aAAa,CAAiB;IAG9B,aAAa,CAA2B;CAC/C;AATD,8CASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,2BAAS,EAAE,CAAC;;oDACb;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACP,aAAa;wDAAC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,qBAAqB,CAAC,EAAE,CAAC;;wDACT","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Attribute } from '../attribute.model';\n\nclass AttributeSnap {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n}\n\nexport class SelectedAttributeItem {\n\t@prop({ required: true, type: String, trim: true, maxlength: 20 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: Number, min: 0, max: 999999999 })\n\tpublic price!: number;\n\n\t@prop({ type: Number, min: 0 })\n\tpublic secondaryPrice?: number;\n}\n\nexport class LineItemAttribute {\n\t@prop({ required: true, ref: () => Attribute })\n\tpublic attribute!: Ref<Attribute>;\n\n\t@prop({ type: AttributeSnap })\n\tpublic attributeSnap?: AttributeSnap;\n\n\t@prop({ required: true, type: [SelectedAttributeItem] })\n\tpublic selectedItems!: SelectedAttributeItem[];\n}\n"]}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { Ref } from '@typegoose/typegoose';
|
|
2
|
-
import { Admin } from '../admin.model';
|
|
3
|
-
import { LogUser, ReplacementReason } from '../../../../utilities/enum';
|
|
4
2
|
import { LineItem } from '../line-item.model';
|
|
5
3
|
export declare class OrderRefund {
|
|
6
|
-
logUsers: LogUser[];
|
|
7
|
-
approvedBy: Ref<Admin>;
|
|
8
4
|
isFullRefund?: boolean;
|
|
9
|
-
reason: ReplacementReason;
|
|
10
|
-
otherReason?: string;
|
|
11
5
|
selectedLineItems?: Ref<LineItem>[];
|
|
12
|
-
refundedAmountByShopForItems
|
|
13
|
-
secondaryRefundedAmountByShopForItems
|
|
14
|
-
refundedAmountByShopForDelivery
|
|
15
|
-
secondaryRefundedAmountByShopForDelivery
|
|
16
|
-
refundedAmountByCompanyForItems
|
|
17
|
-
secondaryRefundedAmountByCompanyForItems
|
|
18
|
-
refundedAmountByCompanyForDelivery
|
|
19
|
-
secondaryRefundedAmountByCompanyForDelivery
|
|
20
|
-
totalRefund
|
|
21
|
-
secondaryTotalRefund
|
|
6
|
+
refundedAmountByShopForItems?: number;
|
|
7
|
+
secondaryRefundedAmountByShopForItems?: number;
|
|
8
|
+
refundedAmountByShopForDelivery?: number;
|
|
9
|
+
secondaryRefundedAmountByShopForDelivery?: number;
|
|
10
|
+
refundedAmountByCompanyForItems?: number;
|
|
11
|
+
secondaryRefundedAmountByCompanyForItems?: number;
|
|
12
|
+
refundedAmountByCompanyForDelivery?: number;
|
|
13
|
+
secondaryRefundedAmountByCompanyForDelivery?: number;
|
|
14
|
+
totalRefund?: number;
|
|
15
|
+
secondaryTotalRefund?: number;
|
|
22
16
|
}
|
|
@@ -11,15 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OrderRefund = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
-
const admin_model_1 = require("../admin.model");
|
|
15
|
-
const enum_1 = require("../../../../utilities/enum");
|
|
16
14
|
const line_item_model_1 = require("../line-item.model");
|
|
17
15
|
class OrderRefund {
|
|
18
|
-
logUsers;
|
|
19
|
-
approvedBy;
|
|
20
16
|
isFullRefund;
|
|
21
|
-
reason;
|
|
22
|
-
otherReason;
|
|
23
17
|
selectedLineItems;
|
|
24
18
|
refundedAmountByShopForItems;
|
|
25
19
|
secondaryRefundedAmountByShopForItems;
|
|
@@ -33,72 +27,52 @@ class OrderRefund {
|
|
|
33
27
|
secondaryTotalRefund;
|
|
34
28
|
}
|
|
35
29
|
exports.OrderRefund = OrderRefund;
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typegoose_1.prop)({
|
|
38
|
-
type: [String],
|
|
39
|
-
enum: enum_1.LogUser,
|
|
40
|
-
default: [],
|
|
41
|
-
}),
|
|
42
|
-
__metadata("design:type", Array)
|
|
43
|
-
], OrderRefund.prototype, "logUsers", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
46
|
-
__metadata("design:type", Object)
|
|
47
|
-
], OrderRefund.prototype, "approvedBy", void 0);
|
|
48
30
|
__decorate([
|
|
49
31
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
50
32
|
__metadata("design:type", Boolean)
|
|
51
33
|
], OrderRefund.prototype, "isFullRefund", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ReplacementReason }),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], OrderRefund.prototype, "reason", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typegoose_1.prop)({ type: String }),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], OrderRefund.prototype, "otherReason", void 0);
|
|
60
34
|
__decorate([
|
|
61
35
|
(0, typegoose_1.prop)({ ref: () => line_item_model_1.LineItem, default: [] }),
|
|
62
36
|
__metadata("design:type", Array)
|
|
63
37
|
], OrderRefund.prototype, "selectedLineItems", void 0);
|
|
64
38
|
__decorate([
|
|
65
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
39
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
66
40
|
__metadata("design:type", Number)
|
|
67
41
|
], OrderRefund.prototype, "refundedAmountByShopForItems", void 0);
|
|
68
42
|
__decorate([
|
|
69
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
43
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
70
44
|
__metadata("design:type", Number)
|
|
71
45
|
], OrderRefund.prototype, "secondaryRefundedAmountByShopForItems", void 0);
|
|
72
46
|
__decorate([
|
|
73
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
47
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
74
48
|
__metadata("design:type", Number)
|
|
75
49
|
], OrderRefund.prototype, "refundedAmountByShopForDelivery", void 0);
|
|
76
50
|
__decorate([
|
|
77
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
51
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
78
52
|
__metadata("design:type", Number)
|
|
79
53
|
], OrderRefund.prototype, "secondaryRefundedAmountByShopForDelivery", void 0);
|
|
80
54
|
__decorate([
|
|
81
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
55
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
82
56
|
__metadata("design:type", Number)
|
|
83
57
|
], OrderRefund.prototype, "refundedAmountByCompanyForItems", void 0);
|
|
84
58
|
__decorate([
|
|
85
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
59
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
86
60
|
__metadata("design:type", Number)
|
|
87
61
|
], OrderRefund.prototype, "secondaryRefundedAmountByCompanyForItems", void 0);
|
|
88
62
|
__decorate([
|
|
89
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
63
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
90
64
|
__metadata("design:type", Number)
|
|
91
65
|
], OrderRefund.prototype, "refundedAmountByCompanyForDelivery", void 0);
|
|
92
66
|
__decorate([
|
|
93
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
67
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
94
68
|
__metadata("design:type", Number)
|
|
95
69
|
], OrderRefund.prototype, "secondaryRefundedAmountByCompanyForDelivery", void 0);
|
|
96
70
|
__decorate([
|
|
97
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
71
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
98
72
|
__metadata("design:type", Number)
|
|
99
73
|
], OrderRefund.prototype, "totalRefund", void 0);
|
|
100
74
|
__decorate([
|
|
101
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
75
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
102
76
|
__metadata("design:type", Number)
|
|
103
77
|
], OrderRefund.prototype, "secondaryTotalRefund", void 0);
|
|
104
78
|
//# sourceMappingURL=order-refund.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-refund.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-refund.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD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E,CAAC;;6EACsB;AAGlD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uEACgB;AAG5C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gFACyB;AAGrD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACP;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yDACE","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { LineItem } from '../line-item.model';\n\nexport class OrderRefund {\n\t@prop({ type: Boolean, default: false })\n\tpublic isFullRefund?: boolean;\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic selectedLineItems?: Ref<LineItem>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByShopForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByShopForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalRefund?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryTotalRefund?: number;\n}\n"]}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { ReplacementType } from '../../../../utilities/enum';
|
|
3
|
+
import { Order } from '../order.model';
|
|
2
4
|
export declare class ReplacementOrder {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
secondaryTotalAmount: number;
|
|
5
|
+
originalOrder: Ref<Order>;
|
|
6
|
+
replacementType: ReplacementType;
|
|
7
|
+
deliveryFee?: number;
|
|
8
|
+
secondaryDeliveryFee?: number;
|
|
9
|
+
replacementByShopForDelivery?: number;
|
|
10
|
+
secondaryReplacementByShopForDelivery?: number;
|
|
11
|
+
replacementByCompanyForItems?: number;
|
|
12
|
+
secondaryReplacementByCompanyForItems?: number;
|
|
13
|
+
replacementByCompanyForDelivery?: number;
|
|
14
|
+
secondaryReplacementByCompanyForDelivery?: number;
|
|
15
|
+
totalAmount?: number;
|
|
16
|
+
secondaryTotalAmount?: number;
|
|
16
17
|
bringItem?: string;
|
|
17
18
|
}
|
|
@@ -12,10 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ReplacementOrder = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const enum_1 = require("../../../../utilities/enum");
|
|
15
|
+
const order_model_1 = require("../order.model");
|
|
15
16
|
class ReplacementOrder {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
type;
|
|
17
|
+
originalOrder;
|
|
18
|
+
replacementType;
|
|
19
19
|
deliveryFee;
|
|
20
20
|
secondaryDeliveryFee;
|
|
21
21
|
replacementByShopForDelivery;
|
|
@@ -30,59 +30,51 @@ class ReplacementOrder {
|
|
|
30
30
|
}
|
|
31
31
|
exports.ReplacementOrder = ReplacementOrder;
|
|
32
32
|
__decorate([
|
|
33
|
-
(0, typegoose_1.prop)({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
default: [],
|
|
37
|
-
}),
|
|
38
|
-
__metadata("design:type", Array)
|
|
39
|
-
], ReplacementOrder.prototype, "logUsers", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ReplacementReason }),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], ReplacementOrder.prototype, "reason", void 0);
|
|
33
|
+
(0, typegoose_1.prop)({ required: true, ref: () => order_model_1.Order }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], ReplacementOrder.prototype, "originalOrder", void 0);
|
|
44
36
|
__decorate([
|
|
45
37
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ReplacementType }),
|
|
46
38
|
__metadata("design:type", String)
|
|
47
|
-
], ReplacementOrder.prototype, "
|
|
39
|
+
], ReplacementOrder.prototype, "replacementType", void 0);
|
|
48
40
|
__decorate([
|
|
49
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
41
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
50
42
|
__metadata("design:type", Number)
|
|
51
43
|
], ReplacementOrder.prototype, "deliveryFee", void 0);
|
|
52
44
|
__decorate([
|
|
53
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
45
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
54
46
|
__metadata("design:type", Number)
|
|
55
47
|
], ReplacementOrder.prototype, "secondaryDeliveryFee", void 0);
|
|
56
48
|
__decorate([
|
|
57
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
49
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
58
50
|
__metadata("design:type", Number)
|
|
59
51
|
], ReplacementOrder.prototype, "replacementByShopForDelivery", void 0);
|
|
60
52
|
__decorate([
|
|
61
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
53
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
62
54
|
__metadata("design:type", Number)
|
|
63
55
|
], ReplacementOrder.prototype, "secondaryReplacementByShopForDelivery", void 0);
|
|
64
56
|
__decorate([
|
|
65
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
57
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
66
58
|
__metadata("design:type", Number)
|
|
67
59
|
], ReplacementOrder.prototype, "replacementByCompanyForItems", void 0);
|
|
68
60
|
__decorate([
|
|
69
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
61
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
70
62
|
__metadata("design:type", Number)
|
|
71
63
|
], ReplacementOrder.prototype, "secondaryReplacementByCompanyForItems", void 0);
|
|
72
64
|
__decorate([
|
|
73
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
65
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
74
66
|
__metadata("design:type", Number)
|
|
75
67
|
], ReplacementOrder.prototype, "replacementByCompanyForDelivery", void 0);
|
|
76
68
|
__decorate([
|
|
77
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
69
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
78
70
|
__metadata("design:type", Number)
|
|
79
71
|
], ReplacementOrder.prototype, "secondaryReplacementByCompanyForDelivery", void 0);
|
|
80
72
|
__decorate([
|
|
81
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
73
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
82
74
|
__metadata("design:type", Number)
|
|
83
75
|
], ReplacementOrder.prototype, "totalAmount", void 0);
|
|
84
76
|
__decorate([
|
|
85
|
-
(0, typegoose_1.prop)({ type: Number,
|
|
77
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
86
78
|
__metadata("design:type", Number)
|
|
87
79
|
], ReplacementOrder.prototype, "secondaryTotalAmount", void 0);
|
|
88
80
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replacement-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/replacement-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"replacement-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/replacement-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA6D;AAC7D,gDAAuC;AAEvC,MAAa,gBAAgB;IAErB,aAAa,CAAc;IAG3B,eAAe,CAAkB;IAGjC,WAAW,CAAU;IAGrB,oBAAoB,CAAU;IAG9B,4BAA4B,CAAU;IAGtC,qCAAqC,CAAU;IAG/C,4BAA4B,CAAU;IAGtC,qCAAqC,CAAU;IAG/C,+BAA+B,CAAU;IAGzC,wCAAwC,CAAU;IAGlD,WAAW,CAAU;IAGrB,oBAAoB,CAAU;IAG9B,SAAS,CAAU;CAC1B;AAvCD,4CAuCC;AArCO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;uDACT;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAe,EAAE,CAAC;;yDACtB;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACP;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACE;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sEACU;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+EACmB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sEACU;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+EACmB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yEACa;AAGzC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kFACsB;AAGlD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACP;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACE;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACG","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { ReplacementType } from '../../../../utilities/enum';\nimport { Order } from '../order.model';\n\nexport class ReplacementOrder {\n\t@prop({ required: true, ref: () => Order })\n\tpublic originalOrder!: Ref<Order>;\n\n\t@prop({ required: true, type: String, enum: ReplacementType })\n\tpublic replacementType: ReplacementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic deliveryFee?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryDeliveryFee?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryTotalAmount?: number;\n\n\t@prop({ type: String })\n\tpublic bringItem?: string;\n}\n"]}
|
|
@@ -6,14 +6,17 @@ import { User } from './user.model';
|
|
|
6
6
|
import { Shop } from './shop.model';
|
|
7
7
|
import { Rider } from './rider.model';
|
|
8
8
|
import { Admin } from './admin.model';
|
|
9
|
+
import { Parent } from './parent.model';
|
|
9
10
|
export declare class Flag extends TimeStamps {
|
|
10
11
|
order: Ref<Order>;
|
|
12
|
+
orderId: string;
|
|
11
13
|
user?: Ref<User>;
|
|
14
|
+
parent?: Ref<Parent>;
|
|
12
15
|
shop?: Ref<Shop>;
|
|
13
16
|
rider?: Ref<Rider>;
|
|
14
17
|
flagType: FlagType;
|
|
15
18
|
logUsers: LogUser[];
|
|
16
|
-
reasonType
|
|
19
|
+
reasonType?: FlagReasonType;
|
|
17
20
|
otherReason?: string;
|
|
18
21
|
flaggedBy?: Ref<Admin>;
|
|
19
22
|
}
|
|
@@ -18,9 +18,12 @@ const user_model_1 = require("./user.model");
|
|
|
18
18
|
const shop_model_1 = require("./shop.model");
|
|
19
19
|
const rider_model_1 = require("./rider.model");
|
|
20
20
|
const admin_model_1 = require("./admin.model");
|
|
21
|
+
const parent_model_1 = require("./parent.model");
|
|
21
22
|
let Flag = class Flag extends defaultClasses_1.TimeStamps {
|
|
22
23
|
order;
|
|
24
|
+
orderId;
|
|
23
25
|
user;
|
|
26
|
+
parent;
|
|
24
27
|
shop;
|
|
25
28
|
rider;
|
|
26
29
|
flagType;
|
|
@@ -34,10 +37,18 @@ __decorate([
|
|
|
34
37
|
(0, typegoose_1.prop)({ required: true, ref: () => order_model_1.Order }),
|
|
35
38
|
__metadata("design:type", Object)
|
|
36
39
|
], Flag.prototype, "order", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Flag.prototype, "orderId", void 0);
|
|
37
44
|
__decorate([
|
|
38
45
|
(0, typegoose_1.prop)({ ref: () => user_model_1.User }),
|
|
39
46
|
__metadata("design:type", Object)
|
|
40
47
|
], Flag.prototype, "user", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typegoose_1.prop)({ ref: () => parent_model_1.Parent }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], Flag.prototype, "parent", void 0);
|
|
41
52
|
__decorate([
|
|
42
53
|
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
|
|
43
54
|
__metadata("design:type", Object)
|
|
@@ -55,7 +66,7 @@ __decorate([
|
|
|
55
66
|
__metadata("design:type", Array)
|
|
56
67
|
], Flag.prototype, "logUsers", void 0);
|
|
57
68
|
__decorate([
|
|
58
|
-
(0, typegoose_1.prop)({
|
|
69
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.FlagReasonType, default: enum_1.FlagReasonType.OTHER }),
|
|
59
70
|
__metadata("design:type", String)
|
|
60
71
|
], Flag.prototype, "reasonType", void 0);
|
|
61
72
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/flag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,kDAA4E;AAC5E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,6CAAoC;AACpC,+CAAsC;AACtC,+CAAsC;
|
|
1
|
+
{"version":3,"file":"flag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/flag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,kDAA4E;AAC5E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,6CAAoC;AACpC,+CAAsC;AACtC,+CAAsC;AACtC,i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E,qBAAc,EAAE,OAAO,EAAE,qBAAc,CAAC,KAAK,EAAE,CAAC;;wCACzC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;uCACG;eAhClB,IAAI;IADhB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;GAC5C,IAAI,CAiChB","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { FlagType, LogUser, FlagReasonType } from '../../../utilities/enum';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\n\n@modelOptions({ schemaOptions: { collection: 'flags' } })\nexport class Flag extends TimeStamps {\n\t@prop({ required: true, ref: () => Order })\n\tpublic order!: Ref<Order>;\n\n\t@prop({ required: true, type: String })\n\tpublic orderId!: string;\n\n\t@prop({ ref: () => User })\n\tpublic user?: Ref<User>;\n\n\t@prop({ ref: () => Parent })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Rider })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ required: true, type: String, enum: FlagType })\n\tpublic flagType!: FlagType;\n\n\t@prop({ required: true, type: [String], enum: LogUser })\n\tpublic logUsers!: LogUser[];\n\n\t@prop({ type: String, enum: FlagReasonType, default: FlagReasonType.OTHER })\n\tpublic reasonType?: FlagReasonType;\n\n\t@prop({ type: String })\n\tpublic otherReason?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic flaggedBy?: Ref<Admin>;\n}\n"]}
|
|
@@ -27,7 +27,7 @@ export declare class Order extends TimeStamps {
|
|
|
27
27
|
isOrderReviewed?: boolean;
|
|
28
28
|
isReviewNotificationSent?: boolean;
|
|
29
29
|
pinCode: number;
|
|
30
|
-
|
|
30
|
+
isFlagged?: boolean;
|
|
31
31
|
flagTypes?: FlagType[];
|
|
32
32
|
flaggedAt?: Date;
|
|
33
33
|
flags: Ref<Flag>[];
|
|
@@ -39,7 +39,7 @@ let Order = class Order extends defaultClasses_1.TimeStamps {
|
|
|
39
39
|
isOrderReviewed;
|
|
40
40
|
isReviewNotificationSent;
|
|
41
41
|
pinCode;
|
|
42
|
-
|
|
42
|
+
isFlagged;
|
|
43
43
|
flagTypes;
|
|
44
44
|
flaggedAt;
|
|
45
45
|
flags;
|
|
@@ -146,7 +146,7 @@ __decorate([
|
|
|
146
146
|
__decorate([
|
|
147
147
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
148
148
|
__metadata("design:type", Boolean)
|
|
149
|
-
], Order.prototype, "
|
|
149
|
+
], Order.prototype, "isFlagged", void 0);
|
|
150
150
|
__decorate([
|
|
151
151
|
(0, typegoose_1.prop)({ type: [String], enum: enum_1.FlagType, default: [] }),
|
|
152
152
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAAkG;AAClG,sEAA4D;AAC5D,+CAAsC;AACtC,kGAAqF;AACrF,iEAAuD;AACvD,6CAAoC;AAqB7B,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,OAAO,CAAS;IAGhB,SAAS,CAAa;IAGtB,KAAK,CAAc;IAGnB,sBAAsB,CAA0B;IAGhD,sBAAsB,CAAO;IAG7B,+BAA+B,CAAS;IAGxC,WAAW,CAAO;IAGlB,sBAAsB,CAAS;IAG/B,WAAW,CAAU;IAGrB,IAAI,CAAU;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AE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3E,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IACvE,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IACzE,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;GAC5D,KAAK,CAsGjB","sourcesContent":["import { prop, Ref, modelOptions, Severity, index } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { FlagType, LateOrderReason, OrderType, UrgentOrderReason } from '../../../utilities/enum';\nimport { OrderCancel } from './embedded/order-cancel.model';\nimport { Rider } from './rider.model';\nimport { DeliveryFeeInformation } from './embedded/order-delivery-information.model';\nimport { OrderDelivery } from './order-delivery.model';\nimport { Flag } from './flag.model';\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'orders',\n\t\tdiscriminatorKey: 'orderType',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@index({ 'deliveryAddress.location': '2dsphere' })\n@index({ user: 1, status: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ itemType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ rider: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\nexport class Order extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic orderId: string;\n\n\t@prop({ type: String, enum: OrderType, default: OrderType.REGULAR })\n\tpublic orderType?: OrderType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ type: () => DeliveryFeeInformation })\n\tpublic deliveryFeeInformation?: DeliveryFeeInformation;\n\n\t@prop({ type: Date })\n\tpublic estimatedDeliveredTime: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedDeliveredTimeInMinutes: number;\n\n\t@prop({ type: Date })\n\tpublic deliveredAt: Date;\n\n\t@prop({ type: Number })\n\tpublic deliveredTimeInMinutes: number;\n\n\t@prop({ type: String })\n\tpublic instruction?: string;\n\n\t@prop({ type: String })\n\tpublic note?: string;\n\n\t@prop({ type: Date })\n\tpublic scheduledFor?: Date;\n\n\t@prop({ type: () => OrderCancel })\n\tpublic orderCancel?: OrderCancel;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLateOrder?: boolean;\n\n\t@prop({\n\t\ttype: [String],\n\t\tenum: LateOrderReason,\n\t\tdefault: [],\n\t})\n\tpublic lateOrderReasons?: LateOrderReason[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgentOrder?: boolean;\n\n\t@prop({\n\t\ttype: [String],\n\t\tenum: UrgentOrderReason,\n\t\tdefault: [],\n\t})\n\tpublic urgentOrderReasons?: UrgentOrderReason[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOrderReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({\n\t\ttype: Number,\n\t\trequired: true,\n\t\tmin: 1000,\n\t\tmax: 9999,\n\t\tvalidate: {\n\t\t\tvalidator: (v: number) => Number.isInteger(v),\n\t\t\tmessage: 'Pin code must be an integer',\n\t\t},\n\t})\n\tpublic pinCode!: number;\n\n\t// Flag feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: [String], enum: FlagType, default: [] })\n\tpublic flagTypes?: FlagType[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic flaggedAt?: Date;\n\n\t@prop({\n\t\tref: () => Flag,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags: Ref<Flag>[];\n\n\t@prop({\n\t\tref: () => OrderDelivery,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t\tjustOne: true,\n\t})\n\tpublic orderDelivery: Ref<OrderDelivery>;\n}\n"]}
|
|
@@ -30,7 +30,6 @@ export declare class RegularOrder extends Order {
|
|
|
30
30
|
isShopDelivery?: boolean;
|
|
31
31
|
preparingTimeInMinutes?: number;
|
|
32
32
|
isReplacementOrder?: boolean;
|
|
33
|
-
originalOrderForReplacement?: Ref<Order>;
|
|
34
33
|
replacementOrderInformation?: ReplacementOrder;
|
|
35
34
|
isRefunded?: boolean;
|
|
36
35
|
refundInformation?: OrderRefund;
|
|
@@ -42,7 +42,6 @@ class RegularOrder extends order_model_1.Order {
|
|
|
42
42
|
isShopDelivery;
|
|
43
43
|
preparingTimeInMinutes;
|
|
44
44
|
isReplacementOrder;
|
|
45
|
-
originalOrderForReplacement;
|
|
46
45
|
replacementOrderInformation;
|
|
47
46
|
isRefunded;
|
|
48
47
|
refundInformation;
|
|
@@ -109,10 +108,6 @@ __decorate([
|
|
|
109
108
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
110
109
|
__metadata("design:type", Boolean)
|
|
111
110
|
], RegularOrder.prototype, "isReplacementOrder", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, typegoose_1.prop)({ ref: () => order_model_1.Order }),
|
|
114
|
-
__metadata("design:type", Object)
|
|
115
|
-
], RegularOrder.prototype, "originalOrderForReplacement", void 0);
|
|
116
111
|
__decorate([
|
|
117
112
|
(0, typegoose_1.prop)({ type: () => replacement_order_model_1.ReplacementOrder }),
|
|
118
113
|
__metadata("design:type", replacement_order_model_1.ReplacementOrder)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAqF;AACrF,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAoF;AACpF,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;AAC5D,2FAAiF;AAEjF,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAY;IAGhB,aAAa,CAAgB;IAG7B,MAAM,CAAqB;IAG3B,cAAc,CAA+B;IAG7C,QAAQ,CAAU;IAGlB,aAAa,CAAU;IAGvB,eAAe,CAAsB;IAGrC,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,cAAc,CAAW;IAGzB,sBAAsB,CAAU;IAGhC,kBAAkB,CAAW;IAG7B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAqF;AACrF,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAoF;AACpF,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;A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I,EAAC,EAAE,IAAI,EAAE,gCAAW,EAAE,CAAC;8BACD,gCAAW;uDAAC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0DACF;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,gCAAW,EAAE,CAAC;8BACF,gCAAW;4DAAC;AAGrC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,oDAAqB,EAAE,CAAC;8BACb,oDAAqB;2DAAC;AAG9C;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACpC,iDAAmB;6CAAC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACX,iDAAmB;qDAAC;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yDACa;AAO7B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;+CACgC;AAO3B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,wCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;sDAC8C","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\nimport { Cart } from '../cart.model';\nimport { Address, RegularOrderAddress, UserAddress } from '../shared/address.model';\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { OrderRefund } from '../embedded/order-refund.model';\nimport { RegularOrderFinance } from '../embedded/regular-order-finance.model';\nimport { EndorseLoss } from '../embedded/order-cancel.model';\nimport { ReplacementOrder } from '../embedded/replacement-order.model';\nimport { LineItem } from '../line-item.model';\nimport { User } from '../user.model';\nimport { Rider } from '../rider.model';\nimport { CartParticipant } from '../cart-participant.model';\nimport { AdjustmentInformation } from '../embedded/adjustment-information.model';\n\nexport class RegularOrder extends Order {\n\tpublic orderType = OrderType.REGULAR as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Rider })\n\tpublic supportRiders?: Ref<Rider>[];\n\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\n\tpublic status: RegularOrderStatus;\n\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\n\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\n\tpublic itemType?: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic pickupAddress: Address;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic deliveryAddress: RegularOrderAddress;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Cart, unique: true })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopDelivery?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic preparingTimeInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacementOrder?: boolean;\n\n\t@prop({ type: () => ReplacementOrder })\n\tpublic replacementOrderInformation?: ReplacementOrder;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: OrderRefund })\n\tpublic refundInformation?: OrderRefund;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => EndorseLoss })\n\tpublic endorseLossInformation?: EndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: () => AdjustmentInformation })\n\tpublic adjustmentInformation?: AdjustmentInformation;\n\n\t@prop({ required: true, type: RegularOrderFinance })\n\tpublic finance: RegularOrderFinance;\n\n\t@prop({ type: RegularOrderFinance })\n\tpublic adjustedFinance?: RegularOrderFinance;\n\n\t@prop({ type: Number })\n\tpublic earnedLoyaltyPoints?: number;\n\n\t@prop({\n\t\tref: () => LineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic lineItems: Ref<LineItem>[];\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic cartParticipants: Ref<CartParticipant>[];\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED