@eventista/ticketing-common 1.0.3 → 1.0.4
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/package.json +6 -3
- package/dist/cluster/config/cluster.config.d.ts +0 -8
- package/dist/cluster/config/cluster.config.js +0 -8
- package/dist/cluster/config/cluster.config.js.map +0 -1
- package/dist/cluster/index.d.ts +0 -2
- package/dist/cluster/index.js +0 -19
- package/dist/cluster/index.js.map +0 -1
- package/dist/cluster/modules/cluster.module.d.ts +0 -2
- package/dist/cluster/modules/cluster.module.js +0 -22
- package/dist/cluster/modules/cluster.module.js.map +0 -1
- package/dist/cluster/services/cluster.service.d.ts +0 -7
- package/dist/cluster/services/cluster.service.js +0 -63
- package/dist/cluster/services/cluster.service.js.map +0 -1
- package/dist/database/index.d.ts +0 -2
- package/dist/database/index.js +0 -19
- package/dist/database/index.js.map +0 -1
- package/dist/database/mongodb/index.d.ts +0 -2
- package/dist/database/mongodb/index.js +0 -19
- package/dist/database/mongodb/index.js.map +0 -1
- package/dist/database/mongodb/mongodb.module.d.ts +0 -2
- package/dist/database/mongodb/mongodb.module.js +0 -50
- package/dist/database/mongodb/mongodb.module.js.map +0 -1
- package/dist/database/mongodb/mongodb.service.d.ts +0 -29
- package/dist/database/mongodb/mongodb.service.js +0 -114
- package/dist/database/mongodb/mongodb.service.js.map +0 -1
- package/dist/database/redis/index.d.ts +0 -2
- package/dist/database/redis/index.js +0 -19
- package/dist/database/redis/index.js.map +0 -1
- package/dist/database/redis/redis.module.d.ts +0 -2
- package/dist/database/redis/redis.module.js +0 -52
- package/dist/database/redis/redis.module.js.map +0 -1
- package/dist/database/redis/redis.service.d.ts +0 -26
- package/dist/database/redis/redis.service.js +0 -126
- package/dist/database/redis/redis.service.js.map +0 -1
- package/dist/exception/exception.filter.d.ts +0 -4
- package/dist/exception/exception.filter.js +0 -35
- package/dist/exception/exception.filter.js.map +0 -1
- package/dist/generic-repository/index.d.ts +0 -4
- package/dist/generic-repository/index.js +0 -21
- package/dist/generic-repository/index.js.map +0 -1
- package/dist/generic-repository/repositories/base.repository.d.ts +0 -39
- package/dist/generic-repository/repositories/base.repository.interface.d.ts +0 -36
- package/dist/generic-repository/repositories/base.repository.interface.js +0 -3
- package/dist/generic-repository/repositories/base.repository.interface.js.map +0 -1
- package/dist/generic-repository/repositories/base.repository.js +0 -96
- package/dist/generic-repository/repositories/base.repository.js.map +0 -1
- package/dist/generic-repository/services/base.service.d.ts +0 -42
- package/dist/generic-repository/services/base.service.interface.d.ts +0 -36
- package/dist/generic-repository/services/base.service.interface.js +0 -3
- package/dist/generic-repository/services/base.service.interface.js.map +0 -1
- package/dist/generic-repository/services/base.service.js +0 -57
- package/dist/generic-repository/services/base.service.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -25
- package/dist/index.js.map +0 -1
- package/dist/logger/custom.logger.d.ts +0 -14
- package/dist/logger/custom.logger.js +0 -76
- package/dist/logger/custom.logger.js.map +0 -1
- package/dist/logger/index.d.ts +0 -2
- package/dist/logger/index.js +0 -19
- package/dist/logger/index.js.map +0 -1
- package/dist/logger/logger.module.d.ts +0 -2
- package/dist/logger/logger.module.js +0 -27
- package/dist/logger/logger.module.js.map +0 -1
- package/dist/pipes/custom-validation.pipe.d.ts +0 -7
- package/dist/pipes/custom-validation.pipe.js +0 -69
- package/dist/pipes/custom-validation.pipe.js.map +0 -1
- package/dist/response/response.interceptor.d.ts +0 -5
- package/dist/response/response.interceptor.js +0 -29
- package/dist/response/response.interceptor.js.map +0 -1
- package/dist/schemas/base.schema.d.ts +0 -11
- package/dist/schemas/base.schema.js +0 -29
- package/dist/schemas/base.schema.js.map +0 -1
- package/dist/schemas/event/event.interfaces.d.ts +0 -69
- package/dist/schemas/event/event.interfaces.js +0 -9
- package/dist/schemas/event/event.interfaces.js.map +0 -1
- package/dist/schemas/event/event.schema.d.ts +0 -70
- package/dist/schemas/event/event.schema.js +0 -242
- package/dist/schemas/event/event.schema.js.map +0 -1
- package/dist/schemas/index.d.ts +0 -14
- package/dist/schemas/index.js +0 -31
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/order/order.interfaces.d.ts +0 -72
- package/dist/schemas/order/order.interfaces.js +0 -31
- package/dist/schemas/order/order.interfaces.js.map +0 -1
- package/dist/schemas/order/order.schema.d.ts +0 -39
- package/dist/schemas/order/order.schema.js +0 -162
- package/dist/schemas/order/order.schema.js.map +0 -1
- package/dist/schemas/promotions/promotions.interfaces.d.ts +0 -30
- package/dist/schemas/promotions/promotions.interfaces.js +0 -14
- package/dist/schemas/promotions/promotions.interfaces.js.map +0 -1
- package/dist/schemas/promotions/promotions.schema.d.ts +0 -25
- package/dist/schemas/promotions/promotions.schema.js +0 -92
- package/dist/schemas/promotions/promotions.schema.js.map +0 -1
- package/dist/schemas/rows/rows.interfaces.d.ts +0 -14
- package/dist/schemas/rows/rows.interfaces.js +0 -3
- package/dist/schemas/rows/rows.interfaces.js.map +0 -1
- package/dist/schemas/rows/rows.schema.d.ts +0 -22
- package/dist/schemas/rows/rows.schema.js +0 -65
- package/dist/schemas/rows/rows.schema.js.map +0 -1
- package/dist/schemas/schema.helper.d.ts +0 -4
- package/dist/schemas/schema.helper.js +0 -84
- package/dist/schemas/schema.helper.js.map +0 -1
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.d.ts +0 -18
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js +0 -3
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js.map +0 -1
- package/dist/schemas/ticket-classes/ticket-classes.schemas.d.ts +0 -26
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js +0 -75
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js.map +0 -1
- package/dist/schemas/ticket-summary/ticket-summary.interfaces.d.ts +0 -19
- package/dist/schemas/ticket-summary/ticket-summary.interfaces.js +0 -9
- package/dist/schemas/ticket-summary/ticket-summary.interfaces.js.map +0 -1
- package/dist/schemas/ticket-summary/ticket-summary.schema.d.ts +0 -23
- package/dist/schemas/ticket-summary/ticket-summary.schema.js +0 -65
- package/dist/schemas/ticket-summary/ticket-summary.schema.js.map +0 -1
- package/dist/schemas/user-fanpass/user-fanpass.interfaces.d.ts +0 -26
- package/dist/schemas/user-fanpass/user-fanpass.interfaces.js +0 -9
- package/dist/schemas/user-fanpass/user-fanpass.interfaces.js.map +0 -1
- package/dist/schemas/user-fanpass/user-fanpass.schemas.d.ts +0 -29
- package/dist/schemas/user-fanpass/user-fanpass.schemas.js +0 -113
- package/dist/schemas/user-fanpass/user-fanpass.schemas.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/cluster/config/cluster.config.ts +0 -6
- package/src/cluster/index.ts +0 -2
- package/src/cluster/modules/cluster.module.ts +0 -9
- package/src/cluster/services/cluster.service.ts +0 -76
- package/src/database/index.ts +0 -2
- package/src/database/mongodb/index.ts +0 -2
- package/src/database/mongodb/mongodb.module.ts +0 -42
- package/src/database/mongodb/mongodb.service.ts +0 -111
- package/src/database/redis/index.ts +0 -2
- package/src/database/redis/redis.module.ts +0 -45
- package/src/database/redis/redis.service.ts +0 -142
- package/src/exception/exception.filter.ts +0 -36
- package/src/generic-repository/index.ts +0 -7
- package/src/generic-repository/repositories/base.repository.interface.ts +0 -78
- package/src/generic-repository/repositories/base.repository.ts +0 -199
- package/src/generic-repository/services/base.service.interface.ts +0 -78
- package/src/generic-repository/services/base.service.ts +0 -165
- package/src/index.ts +0 -13
- package/src/logger/custom.logger.ts +0 -83
- package/src/logger/index.ts +0 -2
- package/src/logger/logger.module.ts +0 -14
- package/src/pipes/custom-validation.pipe.ts +0 -61
- package/src/response/response.interceptor.ts +0 -26
- package/src/schemas/base.schema.ts +0 -19
- package/src/schemas/event/event.interfaces.ts +0 -74
- package/src/schemas/event/event.schema.ts +0 -195
- package/src/schemas/index.ts +0 -16
- package/src/schemas/order/order.interfaces.ts +0 -78
- package/src/schemas/order/order.schema.ts +0 -120
- package/src/schemas/promotions/promotions.interfaces.ts +0 -34
- package/src/schemas/promotions/promotions.schema.ts +0 -71
- package/src/schemas/rows/rows.interfaces.ts +0 -14
- package/src/schemas/rows/rows.schema.ts +0 -47
- package/src/schemas/schema.helper.ts +0 -103
- package/src/schemas/ticket-classes/ticket-classes.interfaces.ts +0 -18
- package/src/schemas/ticket-classes/ticket-classes.schemas.ts +0 -51
- package/src/schemas/ticket-summary/ticket-summary.interfaces.ts +0 -20
- package/src/schemas/ticket-summary/ticket-summary.schema.ts +0 -46
- package/src/schemas/user-fanpass/user-fanpass.interfaces.ts +0 -28
- package/src/schemas/user-fanpass/user-fanpass.schemas.ts +0 -86
- package/tsconfig.json +0 -17
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EventSchema = exports.Event = exports.SchemaVisitor = exports.SchemaGeneral = exports.SchemaPaymentInfoField = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const index_1 = require("../index");
|
|
15
|
-
const event_interfaces_1 = require("./event.interfaces");
|
|
16
|
-
let SchemaPaymentInfoField = class SchemaPaymentInfoField {
|
|
17
|
-
};
|
|
18
|
-
exports.SchemaPaymentInfoField = SchemaPaymentInfoField;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], SchemaPaymentInfoField.prototype, "key", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], SchemaPaymentInfoField.prototype, "text", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({ default: 'text' }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], SchemaPaymentInfoField.prototype, "type", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, mongoose_1.Prop)({ default: false }),
|
|
33
|
-
__metadata("design:type", Boolean)
|
|
34
|
-
], SchemaPaymentInfoField.prototype, "isDefault", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ default: false }),
|
|
37
|
-
__metadata("design:type", Boolean)
|
|
38
|
-
], SchemaPaymentInfoField.prototype, "isRequired", void 0);
|
|
39
|
-
exports.SchemaPaymentInfoField = SchemaPaymentInfoField = __decorate([
|
|
40
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
41
|
-
], SchemaPaymentInfoField);
|
|
42
|
-
let SchemaGeneral = class SchemaGeneral {
|
|
43
|
-
};
|
|
44
|
-
exports.SchemaGeneral = SchemaGeneral;
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, mongoose_1.Prop)({ enum: ['eventista', 'agency', 'seatmap', 'seatmap_zone'], default: 'eventista' }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], SchemaGeneral.prototype, "collaboration", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, mongoose_1.Prop)({ enum: ['e_ticket', 'hard_ticket'], default: 'hard_ticket' }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], SchemaGeneral.prototype, "ticketType", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, mongoose_1.Prop)({ type: [SchemaPaymentInfoField], default: [] }),
|
|
55
|
-
__metadata("design:type", Array)
|
|
56
|
-
], SchemaGeneral.prototype, "paymentInfoFields", void 0);
|
|
57
|
-
exports.SchemaGeneral = SchemaGeneral = __decorate([
|
|
58
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
59
|
-
], SchemaGeneral);
|
|
60
|
-
let SchemaVisitor = class SchemaVisitor {
|
|
61
|
-
};
|
|
62
|
-
exports.SchemaVisitor = SchemaVisitor;
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, mongoose_1.Prop)(),
|
|
65
|
-
__metadata("design:type", String)
|
|
66
|
-
], SchemaVisitor.prototype, "name", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, mongoose_1.Prop)(),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], SchemaVisitor.prototype, "picture", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, mongoose_1.Prop)(),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], SchemaVisitor.prototype, "id", void 0);
|
|
75
|
-
exports.SchemaVisitor = SchemaVisitor = __decorate([
|
|
76
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
77
|
-
], SchemaVisitor);
|
|
78
|
-
let Event = class Event extends index_1.BaseSchema {
|
|
79
|
-
};
|
|
80
|
-
exports.Event = Event;
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], Event.prototype, "eventName", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
87
|
-
__metadata("design:type", String)
|
|
88
|
-
], Event.prototype, "location", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
91
|
-
__metadata("design:type", String)
|
|
92
|
-
], Event.prototype, "address", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
95
|
-
__metadata("design:type", String)
|
|
96
|
-
], Event.prototype, "pathName", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
99
|
-
__metadata("design:type", String)
|
|
100
|
-
], Event.prototype, "thumbnail", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
103
|
-
__metadata("design:type", String)
|
|
104
|
-
], Event.prototype, "logo", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
107
|
-
__metadata("design:type", String)
|
|
108
|
-
], Event.prototype, "venueMap", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, mongoose_1.Prop)({ enum: Object.values(event_interfaces_1.IStatusEvent), default: "OPEN" }),
|
|
111
|
-
__metadata("design:type", String)
|
|
112
|
-
], Event.prototype, "status", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
(0, mongoose_1.Prop)({
|
|
115
|
-
type: [
|
|
116
|
-
{
|
|
117
|
-
calendarId: { type: String, required: true },
|
|
118
|
-
startDate: { type: Date, required: true },
|
|
119
|
-
endDate: { type: Date, required: true },
|
|
120
|
-
maxTicketPerUser: { type: Number, default: -1 },
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
required: true,
|
|
124
|
-
default: [],
|
|
125
|
-
}),
|
|
126
|
-
__metadata("design:type", Array)
|
|
127
|
-
], Event.prototype, "eventCalendar", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, mongoose_1.Prop)({
|
|
130
|
-
type: {
|
|
131
|
-
thumbnail: { type: String, required: false },
|
|
132
|
-
description: { type: String, required: false },
|
|
133
|
-
},
|
|
134
|
-
required: false,
|
|
135
|
-
default: {},
|
|
136
|
-
}),
|
|
137
|
-
__metadata("design:type", Object)
|
|
138
|
-
], Event.prototype, "ticketCalendar", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
(0, mongoose_1.Prop)({}),
|
|
141
|
-
__metadata("design:type", String)
|
|
142
|
-
], Event.prototype, "hostedBy", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, mongoose_1.Prop)({ type: [Object], required: true, default: [] }),
|
|
145
|
-
__metadata("design:type", Array)
|
|
146
|
-
], Event.prototype, "tickets", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
(0, mongoose_1.Prop)({
|
|
149
|
-
type: [
|
|
150
|
-
{
|
|
151
|
-
title: { type: String },
|
|
152
|
-
description: { type: String },
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
required: false,
|
|
156
|
-
default: []
|
|
157
|
-
}),
|
|
158
|
-
__metadata("design:type", Array)
|
|
159
|
-
], Event.prototype, "eventDescriptions", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
(0, mongoose_1.Prop)({
|
|
162
|
-
type: Number,
|
|
163
|
-
required: true,
|
|
164
|
-
default: 0,
|
|
165
|
-
}),
|
|
166
|
-
__metadata("design:type", Number)
|
|
167
|
-
], Event.prototype, "maxTicketPerUser", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
170
|
-
__metadata("design:type", String)
|
|
171
|
-
], Event.prototype, "note", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
(0, mongoose_1.Prop)({ type: SchemaGeneral, default: {} }),
|
|
174
|
-
__metadata("design:type", SchemaGeneral)
|
|
175
|
-
], Event.prototype, "general", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
178
|
-
__metadata("design:type", String)
|
|
179
|
-
], Event.prototype, "domain", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
(0, mongoose_1.Prop)({
|
|
182
|
-
type: [String],
|
|
183
|
-
enum: ['concert', 'live_show', 'workshop', 'fan_meeting'],
|
|
184
|
-
default: [],
|
|
185
|
-
}),
|
|
186
|
-
__metadata("design:type", Array)
|
|
187
|
-
], Event.prototype, "categories", void 0);
|
|
188
|
-
__decorate([
|
|
189
|
-
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
190
|
-
__metadata("design:type", Boolean)
|
|
191
|
-
], Event.prototype, "featuredFlg", void 0);
|
|
192
|
-
__decorate([
|
|
193
|
-
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
194
|
-
__metadata("design:type", Boolean)
|
|
195
|
-
], Event.prototype, "hideInMarketPlace", void 0);
|
|
196
|
-
__decorate([
|
|
197
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
198
|
-
__metadata("design:type", String)
|
|
199
|
-
], Event.prototype, "tenantId", void 0);
|
|
200
|
-
__decorate([
|
|
201
|
-
(0, mongoose_1.Prop)({ type: [SchemaVisitor], default: [] }),
|
|
202
|
-
__metadata("design:type", Array)
|
|
203
|
-
], Event.prototype, "visitors", void 0);
|
|
204
|
-
__decorate([
|
|
205
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
206
|
-
__metadata("design:type", String)
|
|
207
|
-
], Event.prototype, "background", void 0);
|
|
208
|
-
__decorate([
|
|
209
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
210
|
-
__metadata("design:type", String)
|
|
211
|
-
], Event.prototype, "headingBackground", void 0);
|
|
212
|
-
__decorate([
|
|
213
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
214
|
-
__metadata("design:type", String)
|
|
215
|
-
], Event.prototype, "fanpassId", void 0);
|
|
216
|
-
__decorate([
|
|
217
|
-
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
218
|
-
__metadata("design:type", Boolean)
|
|
219
|
-
], Event.prototype, "discountForFanpassUser", void 0);
|
|
220
|
-
__decorate([
|
|
221
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
222
|
-
__metadata("design:type", String)
|
|
223
|
-
], Event.prototype, "type", void 0);
|
|
224
|
-
__decorate([
|
|
225
|
-
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
226
|
-
__metadata("design:type", Boolean)
|
|
227
|
-
], Event.prototype, "authRequired", void 0);
|
|
228
|
-
exports.Event = Event = __decorate([
|
|
229
|
-
(0, mongoose_1.Schema)({
|
|
230
|
-
collection: 'events',
|
|
231
|
-
...index_1.defaultSchemaOptions,
|
|
232
|
-
})
|
|
233
|
-
], Event);
|
|
234
|
-
exports.EventSchema = mongoose_1.SchemaFactory.createForClass(Event);
|
|
235
|
-
(0, index_1.addSoftDeleteHooks)(exports.EventSchema);
|
|
236
|
-
(0, index_1.addUpdateHooks)(exports.EventSchema);
|
|
237
|
-
exports.EventSchema.index({ isDeleted: 1 });
|
|
238
|
-
exports.EventSchema.index({ eventName: 1 });
|
|
239
|
-
exports.EventSchema.index({ pathName: 1 });
|
|
240
|
-
exports.EventSchema.index({ status: 1 });
|
|
241
|
-
exports.EventSchema.index({ tenantId: 1 });
|
|
242
|
-
//# sourceMappingURL=event.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event.schema.js","sourceRoot":"","sources":["../../../src/schemas/event/event.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,oCAA8G;AAC9G,yDAAkD;AAM3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAelC,CAAA;AAfY,wDAAsB;AAE/B;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACb;AAGZ;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACZ;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;;oDACb;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yDACN;AAGnB;IADC,IAAA,eAAI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AAC;AACnC,mBAAW,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AACjC,mBAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/schemas/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './base.schema';
|
|
2
|
-
export * from './schema.helper';
|
|
3
|
-
export * from './ticket-summary/ticket-summary.interfaces';
|
|
4
|
-
export * from './ticket-summary/ticket-summary.schema';
|
|
5
|
-
export * from './ticket-classes/ticket-classes.interfaces';
|
|
6
|
-
export * from './ticket-classes/ticket-classes.schemas';
|
|
7
|
-
export * from './rows/rows.interfaces';
|
|
8
|
-
export * from './rows/rows.schema';
|
|
9
|
-
export * from './order/order.interfaces';
|
|
10
|
-
export * from './order/order.schema';
|
|
11
|
-
export * from './event/event.interfaces';
|
|
12
|
-
export * from './event/event.schema';
|
|
13
|
-
export * from './user-fanpass/user-fanpass.interfaces';
|
|
14
|
-
export * from './user-fanpass/user-fanpass.schemas';
|
package/dist/schemas/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./base.schema"), exports);
|
|
18
|
-
__exportStar(require("./schema.helper"), exports);
|
|
19
|
-
__exportStar(require("./ticket-summary/ticket-summary.interfaces"), exports);
|
|
20
|
-
__exportStar(require("./ticket-summary/ticket-summary.schema"), exports);
|
|
21
|
-
__exportStar(require("./ticket-classes/ticket-classes.interfaces"), exports);
|
|
22
|
-
__exportStar(require("./ticket-classes/ticket-classes.schemas"), exports);
|
|
23
|
-
__exportStar(require("./rows/rows.interfaces"), exports);
|
|
24
|
-
__exportStar(require("./rows/rows.schema"), exports);
|
|
25
|
-
__exportStar(require("./order/order.interfaces"), exports);
|
|
26
|
-
__exportStar(require("./order/order.schema"), exports);
|
|
27
|
-
__exportStar(require("./event/event.interfaces"), exports);
|
|
28
|
-
__exportStar(require("./event/event.schema"), exports);
|
|
29
|
-
__exportStar(require("./user-fanpass/user-fanpass.interfaces"), exports);
|
|
30
|
-
__exportStar(require("./user-fanpass/user-fanpass.schemas"), exports);
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,6EAA2D;AAC3D,yEAAuD;AACvD,6EAA2D;AAC3D,0EAAwD;AACxD,yDAAuC;AACvC,qDAAmC;AACnC,2DAAyC;AACzC,uDAAqC;AACrC,2DAAyC;AACzC,uDAAqC;AACrC,yEAAuD;AACvD,sEAAoD"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export declare enum IPaymentGatewayTypes {
|
|
2
|
-
FREE = "free",
|
|
3
|
-
MOMO = "momo",
|
|
4
|
-
ZALOPAY = "zalopay",
|
|
5
|
-
ZALOPAY_VIETQR = "zalopay_vietqr",
|
|
6
|
-
ZALOPAY_CC = "zalopay_cc",
|
|
7
|
-
VNPAY = "vnpay",
|
|
8
|
-
INTCARD = "intcard",
|
|
9
|
-
PAYPAL = "paypal",
|
|
10
|
-
PAYMENTWALL = "paymentwall",
|
|
11
|
-
COD = "cod",
|
|
12
|
-
MANUALLY = "manually"
|
|
13
|
-
}
|
|
14
|
-
export declare enum IOrderStatus {
|
|
15
|
-
PENDING = "PENDING",
|
|
16
|
-
REVIEW = "REVIEW",
|
|
17
|
-
OPEN = "OPEN",
|
|
18
|
-
SUCCESS = "SUCCESS",
|
|
19
|
-
FAILED = "FAILED",
|
|
20
|
-
CANCELED = "CANCELED",
|
|
21
|
-
EXPIRED = "EXPIRED",
|
|
22
|
-
CONFIRM = "CONFIRM",
|
|
23
|
-
USERCANCEL = "USERCANCEL",
|
|
24
|
-
PAYMENT = "PAYMENT"
|
|
25
|
-
}
|
|
26
|
-
export type ProductType = 'event' | 'fanpass' | 'merchandise';
|
|
27
|
-
export type DeliveryStatus = 'pending' | 'delivered' | 'canceled';
|
|
28
|
-
export type CurrencyCode = 'VND' | 'USD';
|
|
29
|
-
export interface IOrderProduct {
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
price: number;
|
|
33
|
-
thumbnail: string;
|
|
34
|
-
promotion: Record<string, any>;
|
|
35
|
-
quantity: number;
|
|
36
|
-
totalAmount: number;
|
|
37
|
-
}
|
|
38
|
-
export interface IPromotionUsed {
|
|
39
|
-
code: string;
|
|
40
|
-
discountPercent: number;
|
|
41
|
-
maxValue: number;
|
|
42
|
-
}
|
|
43
|
-
export interface IOrder {
|
|
44
|
-
_id?: string;
|
|
45
|
-
eventId: string;
|
|
46
|
-
status: IOrderStatus;
|
|
47
|
-
userId: string;
|
|
48
|
-
productType: ProductType;
|
|
49
|
-
paymentGateway?: IPaymentGatewayTypes;
|
|
50
|
-
tickets: Record<string, any>[];
|
|
51
|
-
paymentTime?: Date;
|
|
52
|
-
deliveryStatus?: DeliveryStatus;
|
|
53
|
-
products: IOrderProduct[];
|
|
54
|
-
promotionUsed?: IPromotionUsed;
|
|
55
|
-
currencyCode?: CurrencyCode;
|
|
56
|
-
originalAmount?: number;
|
|
57
|
-
originalAmountUSD?: number;
|
|
58
|
-
amount?: number;
|
|
59
|
-
amountInUSD?: number;
|
|
60
|
-
userRefId?: string;
|
|
61
|
-
confirmAt?: Date;
|
|
62
|
-
sellFromPlatform?: string;
|
|
63
|
-
cancelReason?: string;
|
|
64
|
-
quantity: number;
|
|
65
|
-
calendarId: string;
|
|
66
|
-
zoneId?: string;
|
|
67
|
-
ticketClassId: string;
|
|
68
|
-
timeCreatePayment?: number;
|
|
69
|
-
createdAt?: Date;
|
|
70
|
-
updatedAt?: Date;
|
|
71
|
-
isDeleted?: boolean;
|
|
72
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IOrderStatus = exports.IPaymentGatewayTypes = void 0;
|
|
4
|
-
var IPaymentGatewayTypes;
|
|
5
|
-
(function (IPaymentGatewayTypes) {
|
|
6
|
-
IPaymentGatewayTypes["FREE"] = "free";
|
|
7
|
-
IPaymentGatewayTypes["MOMO"] = "momo";
|
|
8
|
-
IPaymentGatewayTypes["ZALOPAY"] = "zalopay";
|
|
9
|
-
IPaymentGatewayTypes["ZALOPAY_VIETQR"] = "zalopay_vietqr";
|
|
10
|
-
IPaymentGatewayTypes["ZALOPAY_CC"] = "zalopay_cc";
|
|
11
|
-
IPaymentGatewayTypes["VNPAY"] = "vnpay";
|
|
12
|
-
IPaymentGatewayTypes["INTCARD"] = "intcard";
|
|
13
|
-
IPaymentGatewayTypes["PAYPAL"] = "paypal";
|
|
14
|
-
IPaymentGatewayTypes["PAYMENTWALL"] = "paymentwall";
|
|
15
|
-
IPaymentGatewayTypes["COD"] = "cod";
|
|
16
|
-
IPaymentGatewayTypes["MANUALLY"] = "manually";
|
|
17
|
-
})(IPaymentGatewayTypes || (exports.IPaymentGatewayTypes = IPaymentGatewayTypes = {}));
|
|
18
|
-
var IOrderStatus;
|
|
19
|
-
(function (IOrderStatus) {
|
|
20
|
-
IOrderStatus["PENDING"] = "PENDING";
|
|
21
|
-
IOrderStatus["REVIEW"] = "REVIEW";
|
|
22
|
-
IOrderStatus["OPEN"] = "OPEN";
|
|
23
|
-
IOrderStatus["SUCCESS"] = "SUCCESS";
|
|
24
|
-
IOrderStatus["FAILED"] = "FAILED";
|
|
25
|
-
IOrderStatus["CANCELED"] = "CANCELED";
|
|
26
|
-
IOrderStatus["EXPIRED"] = "EXPIRED";
|
|
27
|
-
IOrderStatus["CONFIRM"] = "CONFIRM";
|
|
28
|
-
IOrderStatus["USERCANCEL"] = "USERCANCEL";
|
|
29
|
-
IOrderStatus["PAYMENT"] = "PAYMENT";
|
|
30
|
-
})(IOrderStatus || (exports.IOrderStatus = IOrderStatus = {}));
|
|
31
|
-
//# sourceMappingURL=order.interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order.interfaces.js","sourceRoot":"","sources":["../../../src/schemas/order/order.interfaces.ts"],"names":[],"mappings":";;;AACA,IAAY,oBAYX;AAZD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,2CAAmB,CAAA;IACnB,yDAAiC,CAAA;IACjC,iDAAyB,CAAA;IACzB,uCAAe,CAAA;IACf,2CAAmB,CAAA;IACnB,yCAAiB,CAAA;IACjB,mDAA2B,CAAA;IAC3B,mCAAW,CAAA;IACX,6CAAqB,CAAA;AACvB,CAAC,EAZW,oBAAoB,oCAApB,oBAAoB,QAY/B;AAED,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,yCAAyB,CAAA;IACzB,mCAAmB,CAAA;AACrB,CAAC,EAXW,YAAY,4BAAZ,YAAY,QAWvB"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { HydratedDocument } from 'mongoose';
|
|
2
|
-
import { BaseDocument, BaseSchema } from '../index';
|
|
3
|
-
import { IOrderStatus, IPaymentGatewayTypes, ProductType, DeliveryStatus, CurrencyCode, IPromotionUsed, IOrderProduct } from './order.interfaces';
|
|
4
|
-
export type OrderDocument = HydratedDocument<Order> & BaseDocument;
|
|
5
|
-
export declare class Order extends BaseSchema {
|
|
6
|
-
eventId: string;
|
|
7
|
-
status: IOrderStatus;
|
|
8
|
-
userId: string;
|
|
9
|
-
productType: ProductType;
|
|
10
|
-
paymentGateway: IPaymentGatewayTypes;
|
|
11
|
-
tickets: Record<string, any>[];
|
|
12
|
-
paymentTime: Date;
|
|
13
|
-
deliveryStatus: DeliveryStatus;
|
|
14
|
-
products: IOrderProduct[];
|
|
15
|
-
promotionUsed: IPromotionUsed;
|
|
16
|
-
currencyCode: CurrencyCode;
|
|
17
|
-
originalAmount: number;
|
|
18
|
-
originalAmountUSD: number;
|
|
19
|
-
amount: number;
|
|
20
|
-
amountInUSD: number;
|
|
21
|
-
userRefId: string;
|
|
22
|
-
confirmAt: Date;
|
|
23
|
-
sellFromPlatform: string;
|
|
24
|
-
cancelReason: string;
|
|
25
|
-
quantity: number;
|
|
26
|
-
calendarId: string;
|
|
27
|
-
zoneId: string;
|
|
28
|
-
ticketClassId: string;
|
|
29
|
-
timeCreatePayment: number;
|
|
30
|
-
}
|
|
31
|
-
export declare const OrderSchema: import("mongoose").Schema<Order, import("mongoose").Model<Order, any, any, any, import("mongoose").Document<unknown, any, Order, any> & Order & {
|
|
32
|
-
_id: import("mongoose").Types.ObjectId;
|
|
33
|
-
} & {
|
|
34
|
-
__v: number;
|
|
35
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Order, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Order>, {}> & import("mongoose").FlatRecord<Order> & {
|
|
36
|
-
_id: import("mongoose").Types.ObjectId;
|
|
37
|
-
} & {
|
|
38
|
-
__v: number;
|
|
39
|
-
}>;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OrderSchema = exports.Order = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const index_1 = require("../index");
|
|
15
|
-
const order_interfaces_1 = require("./order.interfaces");
|
|
16
|
-
let Order = class Order extends index_1.BaseSchema {
|
|
17
|
-
};
|
|
18
|
-
exports.Order = Order;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, mongoose_1.Prop)({
|
|
21
|
-
required: true,
|
|
22
|
-
index: true,
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], Order.prototype, "eventId", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({
|
|
28
|
-
required: true,
|
|
29
|
-
enum: Object.values(order_interfaces_1.IOrderStatus),
|
|
30
|
-
default: order_interfaces_1.IOrderStatus.PENDING,
|
|
31
|
-
index: true,
|
|
32
|
-
}),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], Order.prototype, "status", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({ required: true, index: true }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], Order.prototype, "userId", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, mongoose_1.Prop)({
|
|
41
|
-
required: true,
|
|
42
|
-
enum: ['event', 'fanpass', 'merchandise'],
|
|
43
|
-
index: true,
|
|
44
|
-
}),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], Order.prototype, "productType", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, mongoose_1.Prop)({
|
|
49
|
-
enum: Object.values(order_interfaces_1.IPaymentGatewayTypes),
|
|
50
|
-
index: true,
|
|
51
|
-
}),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], Order.prototype, "paymentGateway", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, mongoose_1.Prop)({ type: [Object], required: true, default: [] }),
|
|
56
|
-
__metadata("design:type", Array)
|
|
57
|
-
], Order.prototype, "tickets", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, mongoose_1.Prop)(),
|
|
60
|
-
__metadata("design:type", Date)
|
|
61
|
-
], Order.prototype, "paymentTime", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, mongoose_1.Prop)({
|
|
64
|
-
enum: ['pending', 'delivered', 'canceled'],
|
|
65
|
-
default: 'pending',
|
|
66
|
-
}),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], Order.prototype, "deliveryStatus", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, mongoose_1.Prop)([
|
|
71
|
-
{
|
|
72
|
-
id: String,
|
|
73
|
-
name: String,
|
|
74
|
-
price: Number,
|
|
75
|
-
thumbnail: String,
|
|
76
|
-
promotion: Object,
|
|
77
|
-
quantity: Number,
|
|
78
|
-
totalAmount: Number,
|
|
79
|
-
},
|
|
80
|
-
]),
|
|
81
|
-
__metadata("design:type", Array)
|
|
82
|
-
], Order.prototype, "products", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, mongoose_1.Prop)({
|
|
85
|
-
type: {
|
|
86
|
-
code: String,
|
|
87
|
-
discountPercent: Number,
|
|
88
|
-
maxValue: Number,
|
|
89
|
-
},
|
|
90
|
-
default: {}
|
|
91
|
-
}),
|
|
92
|
-
__metadata("design:type", Object)
|
|
93
|
-
], Order.prototype, "promotionUsed", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, mongoose_1.Prop)({ enum: ['VND', 'USD'] }),
|
|
96
|
-
__metadata("design:type", String)
|
|
97
|
-
], Order.prototype, "currencyCode", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, mongoose_1.Prop)(),
|
|
100
|
-
__metadata("design:type", Number)
|
|
101
|
-
], Order.prototype, "originalAmount", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, mongoose_1.Prop)(),
|
|
104
|
-
__metadata("design:type", Number)
|
|
105
|
-
], Order.prototype, "originalAmountUSD", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, mongoose_1.Prop)(),
|
|
108
|
-
__metadata("design:type", Number)
|
|
109
|
-
], Order.prototype, "amount", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, mongoose_1.Prop)(),
|
|
112
|
-
__metadata("design:type", Number)
|
|
113
|
-
], Order.prototype, "amountInUSD", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, mongoose_1.Prop)(),
|
|
116
|
-
__metadata("design:type", String)
|
|
117
|
-
], Order.prototype, "userRefId", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, mongoose_1.Prop)(),
|
|
120
|
-
__metadata("design:type", Date)
|
|
121
|
-
], Order.prototype, "confirmAt", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, mongoose_1.Prop)({ default: 'web' }),
|
|
124
|
-
__metadata("design:type", String)
|
|
125
|
-
], Order.prototype, "sellFromPlatform", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
(0, mongoose_1.Prop)({ default: '' }),
|
|
128
|
-
__metadata("design:type", String)
|
|
129
|
-
], Order.prototype, "cancelReason", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
132
|
-
__metadata("design:type", Number)
|
|
133
|
-
], Order.prototype, "quantity", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
136
|
-
__metadata("design:type", String)
|
|
137
|
-
], Order.prototype, "calendarId", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
(0, mongoose_1.Prop)(),
|
|
140
|
-
__metadata("design:type", String)
|
|
141
|
-
], Order.prototype, "zoneId", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, mongoose_1.Prop)({ required: true, index: true }),
|
|
144
|
-
__metadata("design:type", String)
|
|
145
|
-
], Order.prototype, "ticketClassId", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
(0, mongoose_1.Prop)(),
|
|
148
|
-
__metadata("design:type", Number)
|
|
149
|
-
], Order.prototype, "timeCreatePayment", void 0);
|
|
150
|
-
exports.Order = Order = __decorate([
|
|
151
|
-
(0, mongoose_1.Schema)({
|
|
152
|
-
collection: 'orders',
|
|
153
|
-
...index_1.defaultSchemaOptions,
|
|
154
|
-
})
|
|
155
|
-
], Order);
|
|
156
|
-
exports.OrderSchema = mongoose_1.SchemaFactory.createForClass(Order);
|
|
157
|
-
(0, index_1.addSoftDeleteHooks)(exports.OrderSchema);
|
|
158
|
-
(0, index_1.addUpdateHooks)(exports.OrderSchema);
|
|
159
|
-
exports.OrderSchema.index({ isDeleted: 1 });
|
|
160
|
-
exports.OrderSchema.index({ userId: 1, status: 1 });
|
|
161
|
-
exports.OrderSchema.index({ eventId: 1, status: 1 });
|
|
162
|
-
//# sourceMappingURL=order.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order.schema.js","sourceRoot":"","sources":["../../../src/schemas/order/order.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,oCAA8G;AAC9G,yDAAkJ;AAQ3I,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,kBAAU;CAiGpC,CAAA;AAjGY,sBAAK;AAKd;IAJC,IAAA,eAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACd,CAAC;;sCACc;AAQhB;IANC,IAAA,eAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,+BAAY,CAAC;QACjC,OAAO,EAAE,+BAAY,CAAC,OAAO;QAC7B,KAAK,EAAE,IAAI;KACd,CAAC;;qCACmB;AAGrB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;qCACvB;AAOf;IALC,IAAA,eAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC;QACzC,KAAK,EAAE,IAAI;KACd,CAAC;;0CACuB;AAMzB;IAJC,IAAA,eAAI,EAAC;QACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,uCAAoB,CAAC;QACzC,KAAK,EAAE,IAAI;KACd,CAAC;;6CACmC;AAGrC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sCACvB;AAG/B;IADC,IAAA,eAAI,GAAE;8BACM,IAAI;0CAAC;AAMlB;IAJC,IAAA,eAAI,EAAC;QACF,IAAI,EAAE,CAAC,SAAS,EAAE,WAAW,E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CAAC;;4CAChB;AAGtB;IADC,IAAA,eAAI,GAAE;;gDACmB;gBAhGjB,KAAK;IAJjB,IAAA,iBAAM,EAAC;QACJ,UAAU,EAAE,QAAQ;QACpB,GAAG,4BAAoB;KAC1B,CAAC;GACW,KAAK,CAiGjB;AAEY,QAAA,WAAW,GAAG,wBAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAG/D,IAAA,0BAAkB,EAAC,mBAAW,CAAC,CAAC;AAChC,IAAA,sBAAc,EAAC,mBAAW,CAAC,CAAC;AAG5B,mBAAW,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AACpC,mBAAW,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5C,mBAAW,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare enum IPromotionAppliesTo {
|
|
2
|
-
EVENT = "event",
|
|
3
|
-
TICKET = "ticket"
|
|
4
|
-
}
|
|
5
|
-
export interface IPromotionDiscount {
|
|
6
|
-
percent: number;
|
|
7
|
-
percentInUSD: number;
|
|
8
|
-
maxValue: number;
|
|
9
|
-
maxValueInUSD: number;
|
|
10
|
-
}
|
|
11
|
-
export declare enum IPromotionType {
|
|
12
|
-
AUTO = "auto",
|
|
13
|
-
MANUALLY = "manually"
|
|
14
|
-
}
|
|
15
|
-
export interface IPromotion {
|
|
16
|
-
_id?: string;
|
|
17
|
-
eventId: string;
|
|
18
|
-
code: string;
|
|
19
|
-
appliesTo: IPromotionAppliesTo;
|
|
20
|
-
active: boolean;
|
|
21
|
-
maxUsage: number;
|
|
22
|
-
discount: IPromotionDiscount;
|
|
23
|
-
tickets: Record<string, any>[];
|
|
24
|
-
type: IPromotionType;
|
|
25
|
-
minOrderAmount: number;
|
|
26
|
-
minOrderAmountInUSD: number;
|
|
27
|
-
createdAt?: Date;
|
|
28
|
-
updatedAt?: Date;
|
|
29
|
-
isDeleted?: boolean;
|
|
30
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IPromotionType = exports.IPromotionAppliesTo = void 0;
|
|
4
|
-
var IPromotionAppliesTo;
|
|
5
|
-
(function (IPromotionAppliesTo) {
|
|
6
|
-
IPromotionAppliesTo["EVENT"] = "event";
|
|
7
|
-
IPromotionAppliesTo["TICKET"] = "ticket";
|
|
8
|
-
})(IPromotionAppliesTo || (exports.IPromotionAppliesTo = IPromotionAppliesTo = {}));
|
|
9
|
-
var IPromotionType;
|
|
10
|
-
(function (IPromotionType) {
|
|
11
|
-
IPromotionType["AUTO"] = "auto";
|
|
12
|
-
IPromotionType["MANUALLY"] = "manually";
|
|
13
|
-
})(IPromotionType || (exports.IPromotionType = IPromotionType = {}));
|
|
14
|
-
//# sourceMappingURL=promotions.interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promotions.interfaces.js","sourceRoot":"","sources":["../../../src/schemas/promotions/promotions.interfaces.ts"],"names":[],"mappings":";;;AACA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,wCAAiB,CAAA;AACrB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AASD,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|