@lyxa.ai/core 1.1.18 → 1.1.19
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/punch-marketing-history.model.d.ts +7 -4
- package/dist/libraries/mongo/models/punch-marketing-history.model.js +29 -10
- package/dist/libraries/mongo/models/punch-marketing-history.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -3,17 +3,20 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
|
3
3
|
import { PunchMarketing } from './providers/punch-marketing.model';
|
|
4
4
|
import { Shop } from './shop.model';
|
|
5
5
|
import { User } from './user.model';
|
|
6
|
-
import {
|
|
7
|
-
import { PunchMarketingStatus } from '../../../utilities/enum';
|
|
6
|
+
import { PunchMarketingStatus, ValueType } from '../../../utilities/enum';
|
|
8
7
|
export declare class PunchMarketingHistory extends TimeStamps {
|
|
9
8
|
user: Ref<User>;
|
|
10
9
|
marketing: Ref<PunchMarketing>;
|
|
11
10
|
shop: Ref<Shop>;
|
|
12
|
-
|
|
11
|
+
targetOrder: number;
|
|
12
|
+
minimumOrderValue: number;
|
|
13
|
+
completedOrder: number;
|
|
13
14
|
startDate: Date;
|
|
14
15
|
expiryDate: Date;
|
|
15
16
|
completedAt?: Date;
|
|
16
17
|
status: PunchMarketingStatus;
|
|
18
|
+
couponValueType: ValueType;
|
|
19
|
+
couponValue: number;
|
|
20
|
+
couponDurationInDays: number;
|
|
17
21
|
couponExpiryDate: Date;
|
|
18
|
-
coupon?: Ref<Coupon>;
|
|
19
22
|
}
|
|
@@ -15,19 +15,22 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
const punch_marketing_model_1 = require("./providers/punch-marketing.model");
|
|
16
16
|
const shop_model_1 = require("./shop.model");
|
|
17
17
|
const user_model_1 = require("./user.model");
|
|
18
|
-
const coupon_model_1 = require("./coupon.model");
|
|
19
18
|
const enum_1 = require("../../../utilities/enum");
|
|
20
19
|
let PunchMarketingHistory = class PunchMarketingHistory extends defaultClasses_1.TimeStamps {
|
|
21
20
|
user;
|
|
22
21
|
marketing;
|
|
23
22
|
shop;
|
|
24
|
-
|
|
23
|
+
targetOrder;
|
|
24
|
+
minimumOrderValue;
|
|
25
|
+
completedOrder;
|
|
25
26
|
startDate;
|
|
26
27
|
expiryDate;
|
|
27
28
|
completedAt;
|
|
28
29
|
status;
|
|
30
|
+
couponValueType;
|
|
31
|
+
couponValue;
|
|
32
|
+
couponDurationInDays;
|
|
29
33
|
couponExpiryDate;
|
|
30
|
-
coupon;
|
|
31
34
|
};
|
|
32
35
|
exports.PunchMarketingHistory = PunchMarketingHistory;
|
|
33
36
|
__decorate([
|
|
@@ -42,16 +45,24 @@ __decorate([
|
|
|
42
45
|
(0, typegoose_1.prop)({ required: true, ref: () => shop_model_1.Shop }),
|
|
43
46
|
__metadata("design:type", Object)
|
|
44
47
|
], PunchMarketingHistory.prototype, "shop", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], PunchMarketingHistory.prototype, "targetOrder", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], PunchMarketingHistory.prototype, "minimumOrderValue", void 0);
|
|
45
56
|
__decorate([
|
|
46
57
|
(0, typegoose_1.prop)({ type: Number, default: 1 }),
|
|
47
58
|
__metadata("design:type", Number)
|
|
48
|
-
], PunchMarketingHistory.prototype, "
|
|
59
|
+
], PunchMarketingHistory.prototype, "completedOrder", void 0);
|
|
49
60
|
__decorate([
|
|
50
|
-
(0, typegoose_1.prop)({ type: Date }),
|
|
61
|
+
(0, typegoose_1.prop)({ type: Date, default: new Date() }),
|
|
51
62
|
__metadata("design:type", Date)
|
|
52
63
|
], PunchMarketingHistory.prototype, "startDate", void 0);
|
|
53
64
|
__decorate([
|
|
54
|
-
(0, typegoose_1.prop)({ type: Date }),
|
|
65
|
+
(0, typegoose_1.prop)({ type: Date, default: null }),
|
|
55
66
|
__metadata("design:type", Date)
|
|
56
67
|
], PunchMarketingHistory.prototype, "expiryDate", void 0);
|
|
57
68
|
__decorate([
|
|
@@ -62,14 +73,22 @@ __decorate([
|
|
|
62
73
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.PunchMarketingStatus, default: enum_1.PunchMarketingStatus.ACTIVE }),
|
|
63
74
|
__metadata("design:type", String)
|
|
64
75
|
], PunchMarketingHistory.prototype, "status", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ValueType }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], PunchMarketingHistory.prototype, "couponValueType", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], PunchMarketingHistory.prototype, "couponValue", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], PunchMarketingHistory.prototype, "couponDurationInDays", void 0);
|
|
65
88
|
__decorate([
|
|
66
89
|
(0, typegoose_1.prop)({ type: Date, default: null }),
|
|
67
90
|
__metadata("design:type", Date)
|
|
68
91
|
], PunchMarketingHistory.prototype, "couponExpiryDate", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typegoose_1.prop)({ ref: () => coupon_model_1.Coupon }),
|
|
71
|
-
__metadata("design:type", Object)
|
|
72
|
-
], PunchMarketingHistory.prototype, "coupon", void 0);
|
|
73
92
|
exports.PunchMarketingHistory = PunchMarketingHistory = __decorate([
|
|
74
93
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'punchMarketingHistories' } })
|
|
75
94
|
], PunchMarketingHistory);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"punch-marketing-history.model.js","sourceRoot":"/","sources":["libraries/mongo/models/punch-marketing-history.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,6EAAmE;AACnE,6CAAoC;AACpC,6CAAoC;
|
|
1
|
+
{"version":3,"file":"punch-marketing-history.model.js","sourceRoot":"/","sources":["libraries/mongo/models/punch-marketing-history.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,6EAAmE;AACnE,6CAAoC;AACpC,6CAAoC;AAEpC,kDAA0E;AAGnE,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,2BAAU;IAE7C,IAAI,CAAa;IAGjB,SAAS,CAAuB;IAGhC,IAAI,CAAa;IAGjB,WAAW,CAAU;IAGrB,iBAAiB,CAAU;IAG3B,cAAc,CAAS;IAGvB,SAAS,CAAO;IAGhB,UAAU,CAAQ;IAGlB,WAAW,CAAQ;IAGnB,MAAM,CAAuB;IAG7B,eAAe,CAAa;IAG5B,WAAW,CAAU;IAGrB,oBAAoB,CAAU;IAG9B,gBAAgB,CAAO;CAC9B,CAAA;AA1CY,sDAAqB;AAE1B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;mDAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,CAAC;;wDACb;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;mDAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE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,EAAE,UAAU,EAAE,yBAAyB,EAAE,EAAE,CAAC;GAC9D,qBAAqB,CA0CjC","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { Shop } from './shop.model';\nimport { User } from './user.model';\nimport { Coupon } from './coupon.model';\nimport { PunchMarketingStatus, ValueType } from '../../../utilities/enum';\n\n@modelOptions({ schemaOptions: { collection: 'punchMarketingHistories' } })\nexport class PunchMarketingHistory extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => PunchMarketing })\n\tpublic marketing!: Ref<PunchMarketing>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: Number })\n\tpublic targetOrder!: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic minimumOrderValue!: number;\n\n\t@prop({ type: Number, default: 1 })\n\tpublic completedOrder: number;\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic startDate: Date;\n\n\t@prop({ type: Date, default: null })\n\tpublic expiryDate!: Date;\n\n\t@prop({ type: Date, default: null })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: String, enum: PunchMarketingStatus, default: PunchMarketingStatus.ACTIVE })\n\tpublic status: PunchMarketingStatus;\n\n\t@prop({ required: true, type: String, enum: ValueType })\n\tpublic couponValueType!: ValueType;\n\n\t@prop({ required: true, type: Number })\n\tpublic couponValue!: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic couponDurationInDays!: number;\n\n\t@prop({ type: Date, default: null })\n\tpublic couponExpiryDate: Date;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED