@eventista/ticketing-common 1.3.31-dev.4 → 1.3.32-dev.0
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/constants/payment-fee.d.ts +9 -0
- package/dist/constants/payment-fee.js +54 -0
- package/dist/constants/payment-fee.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/event/event.interfaces.d.ts +4 -0
- package/dist/schemas/event/event.schema.d.ts +4 -0
- package/dist/schemas/event/event.schema.js +14 -1
- package/dist/schemas/event/event.schema.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/order/order.interfaces.d.ts +4 -0
- package/dist/schemas/order/order.schema.d.ts +6 -0
- package/dist/schemas/order/order.schema.js +24 -0
- package/dist/schemas/order/order.schema.js.map +1 -1
- package/dist/schemas/resale/resale-listing.interfaces.d.ts +19 -0
- package/dist/schemas/resale/resale-listing.interfaces.js +26 -0
- package/dist/schemas/resale/resale-listing.interfaces.js.map +1 -0
- package/dist/schemas/resale/resale-listing.schema.d.ts +57 -0
- package/dist/schemas/resale/resale-listing.schema.js +210 -0
- package/dist/schemas/resale/resale-listing.schema.js.map +1 -0
- package/dist/schemas/schema.module.js +2 -0
- package/dist/schemas/schema.module.js.map +1 -1
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.d.ts +1 -0
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js.map +1 -1
- package/dist/schemas/ticket-classes/ticket-classes.schemas.d.ts +1 -0
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js +6 -0
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js.map +1 -1
- package/dist/schemas/tickets/tickets.interfaces.d.ts +5 -0
- package/dist/schemas/tickets/tickets.interfaces.js +7 -1
- package/dist/schemas/tickets/tickets.interfaces.js.map +1 -1
- package/dist/schemas/tickets/tickets.schema.d.ts +4 -1
- package/dist/schemas/tickets/tickets.schema.js +27 -1
- package/dist/schemas/tickets/tickets.schema.js.map +1 -1
- package/dist/shared.module.js +6 -0
- package/dist/shared.module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PaymentGatewayFeeConfig {
|
|
2
|
+
flatFee: number;
|
|
3
|
+
txFee: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const PAYMENT_GATEWAY_FEE: Record<string, PaymentGatewayFeeConfig>;
|
|
6
|
+
export declare function getGatewayChargeCurrency(gateway: string): 'VND' | 'USD';
|
|
7
|
+
export declare function getPaymentGatewayFeeConfig(gateway: string): PaymentGatewayFeeConfig | null;
|
|
8
|
+
export declare function calcPaymentGatewayFee(amount: number, gateway: string, currencyCode: string): number;
|
|
9
|
+
export declare function calcPlatformFee(amount: number, percentage: number, currencyCode: string): number;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAYMENT_GATEWAY_FEE = void 0;
|
|
4
|
+
exports.getGatewayChargeCurrency = getGatewayChargeCurrency;
|
|
5
|
+
exports.getPaymentGatewayFeeConfig = getPaymentGatewayFeeConfig;
|
|
6
|
+
exports.calcPaymentGatewayFee = calcPaymentGatewayFee;
|
|
7
|
+
exports.calcPlatformFee = calcPlatformFee;
|
|
8
|
+
exports.PAYMENT_GATEWAY_FEE = {
|
|
9
|
+
zalopay: { flatFee: 0, txFee: 0.8 },
|
|
10
|
+
zalopay_vietqr: { flatFee: 0, txFee: 0.3 },
|
|
11
|
+
zalopay_cc: { flatFee: 3000, txFee: 1.9 },
|
|
12
|
+
onepay_vietqr: { flatFee: 0, txFee: 0.3 },
|
|
13
|
+
onepay_vn_intercard: { flatFee: 4400, txFee: 4 },
|
|
14
|
+
onepay_namavnvx: { flatFee: 4400, txFee: 4 },
|
|
15
|
+
onepay_intercard: { flatFee: 0.18, txFee: 4 },
|
|
16
|
+
onepay_applepay: { flatFee: 0, txFee: 15 },
|
|
17
|
+
onepay_googlepay: { flatFee: 0, txFee: 15 },
|
|
18
|
+
};
|
|
19
|
+
const VND_CHARGE_GATEWAYS = new Set([
|
|
20
|
+
'zalopay',
|
|
21
|
+
'zalopay_vietqr',
|
|
22
|
+
'zalopay_cc',
|
|
23
|
+
'onepay_vietqr',
|
|
24
|
+
'onepay_vn_intercard',
|
|
25
|
+
'onepay_namavnvx',
|
|
26
|
+
]);
|
|
27
|
+
function getGatewayChargeCurrency(gateway) {
|
|
28
|
+
return VND_CHARGE_GATEWAYS.has(gateway) ? 'VND' : 'USD';
|
|
29
|
+
}
|
|
30
|
+
function getPaymentGatewayFeeConfig(gateway) {
|
|
31
|
+
return exports.PAYMENT_GATEWAY_FEE[gateway] ?? null;
|
|
32
|
+
}
|
|
33
|
+
function calcPaymentGatewayFee(amount, gateway, currencyCode) {
|
|
34
|
+
const config = getPaymentGatewayFeeConfig(gateway);
|
|
35
|
+
if (!config || !amount || amount <= 0)
|
|
36
|
+
return 0;
|
|
37
|
+
const { flatFee, txFee } = config;
|
|
38
|
+
if (currencyCode === 'VND') {
|
|
39
|
+
const percentFee = parseFloat(((amount * txFee) / 100).toFixed(8));
|
|
40
|
+
return Math.ceil(percentFee) + flatFee;
|
|
41
|
+
}
|
|
42
|
+
const totalFee = (amount * txFee) / 100 + flatFee;
|
|
43
|
+
return Math.ceil(parseFloat((totalFee * 100).toFixed(8))) / 100;
|
|
44
|
+
}
|
|
45
|
+
function calcPlatformFee(amount, percentage, currencyCode) {
|
|
46
|
+
if (!percentage || !amount || amount <= 0)
|
|
47
|
+
return 0;
|
|
48
|
+
if (currencyCode === 'VND') {
|
|
49
|
+
return Math.ceil(parseFloat(((amount * percentage) / 100).toFixed(8)));
|
|
50
|
+
}
|
|
51
|
+
const fee = (amount * percentage) / 100;
|
|
52
|
+
return Math.ceil(parseFloat((fee * 100).toFixed(8))) / 100;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=payment-fee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-fee.js","sourceRoot":"","sources":["../../src/constants/payment-fee.ts"],"names":[],"mappings":";;;AAuDA,4DAEC;AAED,gEAIC;AASD,sDAgBC;AAMD,0CAaC;AAvFY,QAAA,mBAAmB,GAA4C;IAExE,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;IACnC,cAAc,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;IAC1C,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE;IAGzC,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;IACzC,mBAAmB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;IAEhD,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;IAG5C,gBAAgB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;IAC7C,eAAe,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1C,gBAAgB,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;CAC9C,CAAC;AAUF,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAChC,SAAS;IACT,gBAAgB;IAChB,YAAY;IACZ,eAAe;IACf,qBAAqB;IACrB,iBAAiB;CACpB,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CAAC,OAAe;IACpD,OAAO,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;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AM,GAAG,GAAG,CAAC,MAAM,GAAG,UAAU,CAAC,GAAG,GAAG,CAAC;IACxC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC/D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './logger';
|
|
|
6
6
|
export * from './pipes/custom-validation.pipe';
|
|
7
7
|
export * from './response/response.interceptor';
|
|
8
8
|
export * from './response/skip-response.interceptor';
|
|
9
|
+
export * from './constants/payment-fee';
|
|
9
10
|
export * from './schemas';
|
|
10
11
|
export * from './schemas/schema.module';
|
|
11
12
|
export * from './cluster/index';
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./logger"), exports);
|
|
|
22
22
|
__exportStar(require("./pipes/custom-validation.pipe"), exports);
|
|
23
23
|
__exportStar(require("./response/response.interceptor"), exports);
|
|
24
24
|
__exportStar(require("./response/skip-response.interceptor"), exports);
|
|
25
|
+
__exportStar(require("./constants/payment-fee"), exports);
|
|
25
26
|
__exportStar(require("./schemas"), exports);
|
|
26
27
|
__exportStar(require("./schemas/schema.module"), exports);
|
|
27
28
|
__exportStar(require("./cluster/index"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6CAA2B;AAC3B,+DAA6C;AAC7C,uEAAqD;AACrD,uDAAqC;AAErC,2CAAyB;AAEzB,iEAA+C;AAC/C,kEAA+C;AAC/C,uEAAqD;AAErD,4CAA0B;AAC1B,0DAAwC;AAExC,kDAAgC;AAEhC,qDAAmC;AAEnC,uDAAqC;AAErC,+CAA6B;AAE7B,iDAA+B;AAG/B,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6CAA2B;AAC3B,+DAA6C;AAC7C,uEAAqD;AACrD,uDAAqC;AAErC,2CAAyB;AAEzB,iEAA+C;AAC/C,kEAA+C;AAC/C,uEAAqD;AAErD,0DAAwC;AAExC,4CAA0B;AAC1B,0DAAwC;AAExC,kDAAgC;AAEhC,qDAAmC;AAEnC,uDAAqC;AAErC,+CAA6B;AAE7B,iDAA+B;AAG/B,kDAAgC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ICurrencyCode } from '../order/order.interfaces';
|
|
1
2
|
export declare enum IStatusEvent {
|
|
2
3
|
OPEN = "OPEN",
|
|
3
4
|
CLOSE = "CLOSE"
|
|
@@ -71,6 +72,9 @@ export interface IEvent {
|
|
|
71
72
|
isDeleted?: boolean;
|
|
72
73
|
processingFeeEnabled?: boolean;
|
|
73
74
|
processingFeePercentage?: number;
|
|
75
|
+
thankYouMessage?: string;
|
|
76
|
+
currencyCode?: ICurrencyCode;
|
|
74
77
|
isEventPaused?: boolean;
|
|
75
78
|
saleMode?: string;
|
|
79
|
+
resaleEnabled?: boolean;
|
|
76
80
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HydratedDocument } from 'mongoose';
|
|
2
2
|
import { BaseDocument, BaseSchema } from '../index';
|
|
3
|
+
import { ICurrencyCode } from '../order/order.interfaces';
|
|
3
4
|
import { IEventCalendar } from './event.interfaces';
|
|
4
5
|
export type EventDocument = HydratedDocument<Event> & BaseDocument;
|
|
5
6
|
export declare class SchemaPaymentInfoField {
|
|
@@ -58,9 +59,12 @@ export declare class Event extends BaseSchema {
|
|
|
58
59
|
enableInvoice: boolean;
|
|
59
60
|
processingFeeEnabled: boolean;
|
|
60
61
|
processingFeePercentage: number;
|
|
62
|
+
thankYouMessage: string;
|
|
63
|
+
currencyCode: ICurrencyCode;
|
|
61
64
|
isEventPaused: boolean;
|
|
62
65
|
saleMode: string;
|
|
63
66
|
enableMultiStepCheckin: boolean;
|
|
67
|
+
resaleEnabled: boolean;
|
|
64
68
|
}
|
|
65
69
|
export declare const EventSchema: import("mongoose").Schema<Event, import("mongoose").Model<Event, any, any, any, import("mongoose").Document<unknown, any, Event, any> & Event & {
|
|
66
70
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EventSchema = exports.Event = exports.SchemaVisitor = exports.SchemaGeneral = exports.SchemaPaymentInfoField = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const index_1 = require("../index");
|
|
15
|
+
const order_interfaces_1 = require("../order/order.interfaces");
|
|
15
16
|
const event_interfaces_1 = require("./event.interfaces");
|
|
16
17
|
let SchemaPaymentInfoField = class SchemaPaymentInfoField {
|
|
17
18
|
};
|
|
@@ -246,9 +247,17 @@ __decorate([
|
|
|
246
247
|
__metadata("design:type", Boolean)
|
|
247
248
|
], Event.prototype, "processingFeeEnabled", void 0);
|
|
248
249
|
__decorate([
|
|
249
|
-
(0, mongoose_1.Prop)(),
|
|
250
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
250
251
|
__metadata("design:type", Number)
|
|
251
252
|
], Event.prototype, "processingFeePercentage", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
(0, mongoose_1.Prop)({ type: String, required: false, default: '' }),
|
|
255
|
+
__metadata("design:type", String)
|
|
256
|
+
], Event.prototype, "thankYouMessage", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(order_interfaces_1.ICurrencyCode), default: order_interfaces_1.ICurrencyCode.VND }),
|
|
259
|
+
__metadata("design:type", String)
|
|
260
|
+
], Event.prototype, "currencyCode", void 0);
|
|
252
261
|
__decorate([
|
|
253
262
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
254
263
|
__metadata("design:type", Boolean)
|
|
@@ -264,6 +273,10 @@ __decorate([
|
|
|
264
273
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
265
274
|
__metadata("design:type", Boolean)
|
|
266
275
|
], Event.prototype, "enableMultiStepCheckin", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
278
|
+
__metadata("design:type", Boolean)
|
|
279
|
+
], Event.prototype, "resaleEnabled", void 0);
|
|
267
280
|
exports.Event = Event = __decorate([
|
|
268
281
|
(0, mongoose_1.Schema)({
|
|
269
282
|
collection: 'events',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.schema.js","sourceRoot":"","sources":["../../../src/schemas/event/event.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,oCAA8G;AAC9G,yDAAkE;AAK3D,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,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0DACL;iCAdX,sBAAsB;IADlC,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,sBAAsB,CAelC;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CASzB,CAAA;AATY,sCAAa;AAEtB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;;oDACvB;AAGtB;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
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -23,3 +23,5 @@ export * from './event-ticket/event-ticket.schema';
|
|
|
23
23
|
export * from './import/import.schema';
|
|
24
24
|
export * from './gift-record/gift-record.interfaces';
|
|
25
25
|
export * from './gift-record/gift-record.schema';
|
|
26
|
+
export * from './resale/resale-listing.interfaces';
|
|
27
|
+
export * from './resale/resale-listing.schema';
|
package/dist/schemas/index.js
CHANGED
|
@@ -39,4 +39,6 @@ __exportStar(require("./event-ticket/event-ticket.schema"), exports);
|
|
|
39
39
|
__exportStar(require("./import/import.schema"), exports);
|
|
40
40
|
__exportStar(require("./gift-record/gift-record.interfaces"), exports);
|
|
41
41
|
__exportStar(require("./gift-record/gift-record.schema"), exports);
|
|
42
|
+
__exportStar(require("./resale/resale-listing.interfaces"), exports);
|
|
43
|
+
__exportStar(require("./resale/resale-listing.schema"), exports);
|
|
42
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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;AACpD,qEAAmD;AACnD,iEAA+C;AAC/C,0DAAwC;AACxC,sDAAoC;AACpC,+DAA6C;AAC7C,2DAAyC;AACzC,+EAA6D;AAC7D,qEAAmD;AACnD,yDAAuC;AAEvC,uEAAqD;AACrD,mEAAiD"}
|
|
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;AACpD,qEAAmD;AACnD,iEAA+C;AAC/C,0DAAwC;AACxC,sDAAoC;AACpC,+DAA6C;AAC7C,2DAAyC;AACzC,+EAA6D;AAC7D,qEAAmD;AACnD,yDAAuC;AAEvC,uEAAqD;AACrD,mEAAiD;AAEjD,qEAAmD;AACnD,iEAA+C"}
|
|
@@ -111,4 +111,8 @@ export interface IOrder {
|
|
|
111
111
|
processingFeeAmount?: number;
|
|
112
112
|
processingFeeAmountInUSD?: number;
|
|
113
113
|
processingFeePercent?: number;
|
|
114
|
+
paymentGatewayFeeAmount?: number;
|
|
115
|
+
paymentGatewayFeeAmountInUSD?: number;
|
|
116
|
+
paymentGatewayFeePercent?: number;
|
|
117
|
+
paymentGatewayFeeFlat?: number;
|
|
114
118
|
}
|
|
@@ -47,6 +47,10 @@ export declare class Order extends BaseSchema {
|
|
|
47
47
|
processingFeeAmount: number;
|
|
48
48
|
processingFeeAmountInUSD: number;
|
|
49
49
|
processingFeePercent: number;
|
|
50
|
+
paymentGatewayFeeAmount: number;
|
|
51
|
+
paymentGatewayFeeAmountInUSD: number;
|
|
52
|
+
paymentGatewayFeePercent: number;
|
|
53
|
+
paymentGatewayFeeFlat: number;
|
|
50
54
|
isInvoiceRequested: boolean;
|
|
51
55
|
invoiceInfo: {
|
|
52
56
|
email: string;
|
|
@@ -56,6 +60,8 @@ export declare class Order extends BaseSchema {
|
|
|
56
60
|
};
|
|
57
61
|
selectedTicketsSnapshot: string[];
|
|
58
62
|
deliveredTickets: Record<string, any>[];
|
|
63
|
+
ticketsResold: Record<string, any>[];
|
|
64
|
+
resaleListingIds: string[];
|
|
59
65
|
}
|
|
60
66
|
export declare const OrderSchema: import("mongoose").Schema<Order, import("mongoose").Model<Order, any, any, any, import("mongoose").Document<unknown, any, Order, any> & Order & {
|
|
61
67
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -234,6 +234,22 @@ __decorate([
|
|
|
234
234
|
(0, mongoose_1.Prop)(),
|
|
235
235
|
__metadata("design:type", Number)
|
|
236
236
|
], Order.prototype, "processingFeePercent", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
239
|
+
__metadata("design:type", Number)
|
|
240
|
+
], Order.prototype, "paymentGatewayFeeAmount", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
243
|
+
__metadata("design:type", Number)
|
|
244
|
+
], Order.prototype, "paymentGatewayFeeAmountInUSD", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
247
|
+
__metadata("design:type", Number)
|
|
248
|
+
], Order.prototype, "paymentGatewayFeePercent", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
251
|
+
__metadata("design:type", Number)
|
|
252
|
+
], Order.prototype, "paymentGatewayFeeFlat", void 0);
|
|
237
253
|
__decorate([
|
|
238
254
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
239
255
|
__metadata("design:type", Boolean)
|
|
@@ -259,6 +275,14 @@ __decorate([
|
|
|
259
275
|
(0, mongoose_1.Prop)({ type: [Object], default: [] }),
|
|
260
276
|
__metadata("design:type", Array)
|
|
261
277
|
], Order.prototype, "deliveredTickets", void 0);
|
|
278
|
+
__decorate([
|
|
279
|
+
(0, mongoose_1.Prop)({ type: [Object], default: [] }),
|
|
280
|
+
__metadata("design:type", Array)
|
|
281
|
+
], Order.prototype, "ticketsResold", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
284
|
+
__metadata("design:type", Array)
|
|
285
|
+
], Order.prototype, "resaleListingIds", void 0);
|
|
262
286
|
exports.Order = Order = __decorate([
|
|
263
287
|
(0, mongoose_1.Schema)({
|
|
264
288
|
collection: 'orders',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.schema.js","sourceRoot":"","sources":["../../../src/schemas/order/order.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,oCAA8G;AAC9G,yDAAqI;AAQ9H,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,kBAAU;
|
|
1
|
+
{"version":3,"file":"order.schema.js","sourceRoot":"","sources":["../../../src/schemas/order/order.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,oCAA8G;AAC9G,yDAAqI;AAQ9H,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,kBAAU;CA2NpC,CAAA;AA3NY,sBAAK;AAKd;IAJC,IAAA,eAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACd,CAAC;;sCACc;AAMhB;IAJC,IAAA,eAAI,EAAC;QACF,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,EAAE;KACd,CAAC;;mCACW;AAOb;IALC,IAAA,eAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,+BAAY,CAAC;QACjC,OAAO,EAAE,+BAAY,CAAC,OAAO;KAChC,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,MAAM,CAAC,MAAM,CAAC,+BAAY,CAAC;QACjC,KAAK,EAAE,IAAI;KACd,CAAC;;0CACwB;AAM1B;IAJC,IAAA,eAAI,EAAC;QACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,uCAAoB,CAAC;QACzC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/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;AAC7C,mBAAW,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AACtE,mBAAW,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum ResaleListingStatus {
|
|
2
|
+
ACTIVE = "ACTIVE",
|
|
3
|
+
RESERVED = "RESERVED",
|
|
4
|
+
SOLD = "SOLD",
|
|
5
|
+
CANCELLED = "CANCELLED",
|
|
6
|
+
EXPIRED = "EXPIRED"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ResaleListingType {
|
|
9
|
+
SINGLE = "single",
|
|
10
|
+
COMBO = "combo"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ResalePayoutStatus {
|
|
13
|
+
NONE = "NONE",
|
|
14
|
+
PENDING = "PENDING",
|
|
15
|
+
PROCESSING = "PROCESSING",
|
|
16
|
+
COMPLETED = "COMPLETED",
|
|
17
|
+
FAILED = "FAILED",
|
|
18
|
+
REVERTED = "REVERTED"
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResalePayoutStatus = exports.ResaleListingType = exports.ResaleListingStatus = void 0;
|
|
4
|
+
var ResaleListingStatus;
|
|
5
|
+
(function (ResaleListingStatus) {
|
|
6
|
+
ResaleListingStatus["ACTIVE"] = "ACTIVE";
|
|
7
|
+
ResaleListingStatus["RESERVED"] = "RESERVED";
|
|
8
|
+
ResaleListingStatus["SOLD"] = "SOLD";
|
|
9
|
+
ResaleListingStatus["CANCELLED"] = "CANCELLED";
|
|
10
|
+
ResaleListingStatus["EXPIRED"] = "EXPIRED";
|
|
11
|
+
})(ResaleListingStatus || (exports.ResaleListingStatus = ResaleListingStatus = {}));
|
|
12
|
+
var ResaleListingType;
|
|
13
|
+
(function (ResaleListingType) {
|
|
14
|
+
ResaleListingType["SINGLE"] = "single";
|
|
15
|
+
ResaleListingType["COMBO"] = "combo";
|
|
16
|
+
})(ResaleListingType || (exports.ResaleListingType = ResaleListingType = {}));
|
|
17
|
+
var ResalePayoutStatus;
|
|
18
|
+
(function (ResalePayoutStatus) {
|
|
19
|
+
ResalePayoutStatus["NONE"] = "NONE";
|
|
20
|
+
ResalePayoutStatus["PENDING"] = "PENDING";
|
|
21
|
+
ResalePayoutStatus["PROCESSING"] = "PROCESSING";
|
|
22
|
+
ResalePayoutStatus["COMPLETED"] = "COMPLETED";
|
|
23
|
+
ResalePayoutStatus["FAILED"] = "FAILED";
|
|
24
|
+
ResalePayoutStatus["REVERTED"] = "REVERTED";
|
|
25
|
+
})(ResalePayoutStatus || (exports.ResalePayoutStatus = ResalePayoutStatus = {}));
|
|
26
|
+
//# sourceMappingURL=resale-listing.interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resale-listing.interfaces.js","sourceRoot":"","sources":["../../../src/schemas/resale/resale-listing.interfaces.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC3B,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,oCAAa,CAAA;IACb,8CAAuB,CAAA;IACvB,0CAAmB,CAAA;AACvB,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,sCAAiB,CAAA;IACjB,oCAAe,CAAA;AACnB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC1B,mCAAa,CAAA;IACb,yCAAmB,CAAA;IACnB,+CAAyB,CAAA;IACzB,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;AACzB,CAAC,EAPW,kBAAkB,kCAAlB,kBAAkB,QAO7B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
|
|
2
|
+
import { BaseDocument, BaseSchema } from '../index';
|
|
3
|
+
export declare class ResaleTicketItem {
|
|
4
|
+
ticketId: string;
|
|
5
|
+
ticketClassId: string;
|
|
6
|
+
zoneId: string;
|
|
7
|
+
seatLabel?: string;
|
|
8
|
+
originalPriceVn: number;
|
|
9
|
+
netPriceVn: number;
|
|
10
|
+
ticketClassName?: string;
|
|
11
|
+
zoneName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class PayoutInfo {
|
|
14
|
+
bankCode: string;
|
|
15
|
+
bankAccountNumber: string;
|
|
16
|
+
bankAccountName: string;
|
|
17
|
+
bankName?: string;
|
|
18
|
+
}
|
|
19
|
+
export type ResaleListingDocument = HydratedDocument<ResaleListing> & BaseDocument;
|
|
20
|
+
export declare class ResaleListing extends BaseSchema {
|
|
21
|
+
listingCode: string;
|
|
22
|
+
listingType: string;
|
|
23
|
+
eventId: string;
|
|
24
|
+
calendarId: string;
|
|
25
|
+
sellerId: string;
|
|
26
|
+
originalOrderId: string;
|
|
27
|
+
tickets: ResaleTicketItem[];
|
|
28
|
+
totalNetVn: number;
|
|
29
|
+
platformFeeAmount: number;
|
|
30
|
+
taxAmount: number;
|
|
31
|
+
subsidyAmount: number;
|
|
32
|
+
buyerPaysTotal: number;
|
|
33
|
+
sellerReceives: number;
|
|
34
|
+
payoutInfo: PayoutInfo;
|
|
35
|
+
status: string;
|
|
36
|
+
reservedBy?: string;
|
|
37
|
+
reservedAt?: Date;
|
|
38
|
+
buyerOrderId?: string;
|
|
39
|
+
payoutStatus: string;
|
|
40
|
+
payoutProcessedAt?: Date;
|
|
41
|
+
payoutTransferId?: string;
|
|
42
|
+
payoutTransactionId?: string;
|
|
43
|
+
payoutRetryCount: number;
|
|
44
|
+
payoutError?: string;
|
|
45
|
+
payoutNotifiedAt?: Date;
|
|
46
|
+
cancelledBy?: string;
|
|
47
|
+
cancelledReason?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const ResaleListingSchema: MongooseSchema<ResaleListing, import("mongoose").Model<ResaleListing, any, any, any, import("mongoose").Document<unknown, any, ResaleListing, any> & ResaleListing & {
|
|
50
|
+
_id: import("mongoose").Types.ObjectId;
|
|
51
|
+
} & {
|
|
52
|
+
__v: number;
|
|
53
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ResaleListing, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ResaleListing>, {}> & import("mongoose").FlatRecord<ResaleListing> & {
|
|
54
|
+
_id: import("mongoose").Types.ObjectId;
|
|
55
|
+
} & {
|
|
56
|
+
__v: number;
|
|
57
|
+
}>;
|
|
@@ -0,0 +1,210 @@
|
|
|
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.ResaleListingSchema = exports.ResaleListing = exports.PayoutInfo = exports.ResaleTicketItem = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const index_1 = require("../index");
|
|
16
|
+
const resale_listing_interfaces_1 = require("./resale-listing.interfaces");
|
|
17
|
+
class ResaleTicketItem {
|
|
18
|
+
}
|
|
19
|
+
exports.ResaleTicketItem = ResaleTicketItem;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ResaleTicketItem.prototype, "ticketId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ResaleTicketItem.prototype, "ticketClassId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ResaleTicketItem.prototype, "zoneId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ResaleTicketItem.prototype, "seatLabel", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], ResaleTicketItem.prototype, "originalPriceVn", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], ResaleTicketItem.prototype, "netPriceVn", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ResaleTicketItem.prototype, "ticketClassName", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], ResaleTicketItem.prototype, "zoneName", void 0);
|
|
52
|
+
class PayoutInfo {
|
|
53
|
+
}
|
|
54
|
+
exports.PayoutInfo = PayoutInfo;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], PayoutInfo.prototype, "bankCode", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], PayoutInfo.prototype, "bankAccountNumber", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], PayoutInfo.prototype, "bankAccountName", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], PayoutInfo.prototype, "bankName", void 0);
|
|
71
|
+
let ResaleListing = class ResaleListing extends index_1.BaseSchema {
|
|
72
|
+
};
|
|
73
|
+
exports.ResaleListing = ResaleListing;
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, mongoose_1.Prop)({ type: String, index: true, unique: true, sparse: true }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], ResaleListing.prototype, "listingCode", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, mongoose_1.Prop)({
|
|
80
|
+
type: String,
|
|
81
|
+
enum: Object.values(resale_listing_interfaces_1.ResaleListingType),
|
|
82
|
+
required: true,
|
|
83
|
+
}),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], ResaleListing.prototype, "listingType", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, mongoose_1.Prop)({ type: String, required: true, index: true }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], ResaleListing.prototype, "eventId", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, mongoose_1.Prop)({ type: String, required: true, index: true }),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], ResaleListing.prototype, "calendarId", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, mongoose_1.Prop)({ type: String, required: true, index: true }),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], ResaleListing.prototype, "sellerId", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], ResaleListing.prototype, "originalOrderId", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, mongoose_1.Prop)({ type: [mongoose_2.Schema.Types.Mixed], required: true }),
|
|
104
|
+
__metadata("design:type", Array)
|
|
105
|
+
], ResaleListing.prototype, "tickets", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
108
|
+
__metadata("design:type", Number)
|
|
109
|
+
], ResaleListing.prototype, "totalNetVn", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
112
|
+
__metadata("design:type", Number)
|
|
113
|
+
], ResaleListing.prototype, "platformFeeAmount", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
116
|
+
__metadata("design:type", Number)
|
|
117
|
+
], ResaleListing.prototype, "taxAmount", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
120
|
+
__metadata("design:type", Number)
|
|
121
|
+
], ResaleListing.prototype, "subsidyAmount", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
124
|
+
__metadata("design:type", Number)
|
|
125
|
+
], ResaleListing.prototype, "buyerPaysTotal", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
128
|
+
__metadata("design:type", Number)
|
|
129
|
+
], ResaleListing.prototype, "sellerReceives", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: true }),
|
|
132
|
+
__metadata("design:type", PayoutInfo)
|
|
133
|
+
], ResaleListing.prototype, "payoutInfo", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, mongoose_1.Prop)({
|
|
136
|
+
type: String,
|
|
137
|
+
enum: Object.values(resale_listing_interfaces_1.ResaleListingStatus),
|
|
138
|
+
default: resale_listing_interfaces_1.ResaleListingStatus.ACTIVE,
|
|
139
|
+
index: true,
|
|
140
|
+
}),
|
|
141
|
+
__metadata("design:type", String)
|
|
142
|
+
], ResaleListing.prototype, "status", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], ResaleListing.prototype, "reservedBy", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, mongoose_1.Prop)({ type: Date }),
|
|
149
|
+
__metadata("design:type", Date)
|
|
150
|
+
], ResaleListing.prototype, "reservedAt", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
153
|
+
__metadata("design:type", String)
|
|
154
|
+
], ResaleListing.prototype, "buyerOrderId", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, mongoose_1.Prop)({
|
|
157
|
+
type: String,
|
|
158
|
+
enum: Object.values(resale_listing_interfaces_1.ResalePayoutStatus),
|
|
159
|
+
default: resale_listing_interfaces_1.ResalePayoutStatus.NONE,
|
|
160
|
+
}),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], ResaleListing.prototype, "payoutStatus", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, mongoose_1.Prop)({ type: Date }),
|
|
165
|
+
__metadata("design:type", Date)
|
|
166
|
+
], ResaleListing.prototype, "payoutProcessedAt", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
169
|
+
__metadata("design:type", String)
|
|
170
|
+
], ResaleListing.prototype, "payoutTransferId", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
173
|
+
__metadata("design:type", String)
|
|
174
|
+
], ResaleListing.prototype, "payoutTransactionId", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
177
|
+
__metadata("design:type", Number)
|
|
178
|
+
], ResaleListing.prototype, "payoutRetryCount", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], ResaleListing.prototype, "payoutError", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, mongoose_1.Prop)({ type: Date }),
|
|
185
|
+
__metadata("design:type", Date)
|
|
186
|
+
], ResaleListing.prototype, "payoutNotifiedAt", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
189
|
+
__metadata("design:type", String)
|
|
190
|
+
], ResaleListing.prototype, "cancelledBy", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
193
|
+
__metadata("design:type", String)
|
|
194
|
+
], ResaleListing.prototype, "cancelledReason", void 0);
|
|
195
|
+
exports.ResaleListing = ResaleListing = __decorate([
|
|
196
|
+
(0, mongoose_1.Schema)({
|
|
197
|
+
collection: 'resale_listings',
|
|
198
|
+
...index_1.defaultSchemaOptions,
|
|
199
|
+
})
|
|
200
|
+
], ResaleListing);
|
|
201
|
+
exports.ResaleListingSchema = mongoose_1.SchemaFactory.createForClass(ResaleListing);
|
|
202
|
+
(0, index_1.addUpdateHooks)(exports.ResaleListingSchema);
|
|
203
|
+
(0, index_1.addSoftDeleteHooks)(exports.ResaleListingSchema);
|
|
204
|
+
exports.ResaleListingSchema.index({ eventId: 1, status: 1 });
|
|
205
|
+
exports.ResaleListingSchema.index({ sellerId: 1, status: 1 });
|
|
206
|
+
exports.ResaleListingSchema.index({ status: 1, reservedAt: 1 });
|
|
207
|
+
exports.ResaleListingSchema.index({ 'tickets.ticketId': 1 });
|
|
208
|
+
exports.ResaleListingSchema.index({ status: 1, payoutStatus: 1 });
|
|
209
|
+
exports.ResaleListingSchema.index({ payoutStatus: 1, payoutNotifiedAt: 1 });
|
|
210
|
+
//# sourceMappingURL=resale-listing.schema.js.map
|