c2-climbing-x 1.0.64 → 1.0.65
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/models/Ticket.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IAccount } from "./Account";
|
|
3
3
|
import { IChallenge } from "./Challenge";
|
|
4
|
+
import { ITicketOrder } from "./TicketOrder";
|
|
4
5
|
export declare enum TicketStatusInGamming {
|
|
5
6
|
READY = "READY",
|
|
6
7
|
SCALLING = "SCALLING",
|
|
@@ -18,6 +19,7 @@ export interface ITicket {
|
|
|
18
19
|
challenge: Types.ObjectId | IChallenge;
|
|
19
20
|
statusInGamming: TicketStatusInGamming;
|
|
20
21
|
statusFinancial: TicketStatusFinancial;
|
|
22
|
+
ticketOrder: Types.ObjectId | ITicketOrder;
|
|
21
23
|
createdAtDateTime: Date;
|
|
22
24
|
updatedAtDateTime: Date;
|
|
23
25
|
}
|
package/dist/models/Ticket.js
CHANGED
|
@@ -20,6 +20,12 @@ exports.TicketSchema = new mongoose_1.Schema({
|
|
|
20
20
|
challenge: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge", required: true },
|
|
21
21
|
statusInGamming: { type: String, required: true, enum: TicketStatusInGamming },
|
|
22
22
|
statusFinancial: { type: String, required: true, enum: TicketStatusFinancial },
|
|
23
|
+
ticketOrder: { type: mongoose_1.Schema.Types.ObjectId, ref: "ticket-order", required: true },
|
|
24
|
+
}, {
|
|
25
|
+
timestamps: {
|
|
26
|
+
createdAt: "createdAtDateTime",
|
|
27
|
+
updatedAt: "updatedAtDateTime"
|
|
28
|
+
}
|
|
23
29
|
});
|
|
24
30
|
exports.TicketSchema.index({ account: 1 });
|
|
25
31
|
exports.TicketSchema.index({ challenge: 1 });
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
import { IChallenge } from "./Challenge";
|
|
4
|
+
export declare enum TicketOrderPaymentMethod {
|
|
5
|
+
CREDITS = "CREDITS",
|
|
6
|
+
CREDIT_CARD = "CREDIT_CARD",
|
|
7
|
+
DEBIT_CARD = "DEBIT_CARD",
|
|
8
|
+
PIX = "PIX"
|
|
9
|
+
}
|
|
10
|
+
export declare enum TicketOrderStatus {
|
|
11
|
+
DRAFT = "DRAFT",
|
|
12
|
+
PENDING = "PENDING",
|
|
13
|
+
PAID = "PAID",
|
|
14
|
+
CANCELLED = "CANCELLED"
|
|
15
|
+
}
|
|
16
|
+
export interface ITicketOrder {
|
|
17
|
+
_id: Types.ObjectId;
|
|
18
|
+
sequenceNumber: number;
|
|
19
|
+
account: Types.ObjectId | IAccount;
|
|
20
|
+
challenge: Types.ObjectId | IChallenge;
|
|
21
|
+
status: TicketOrderStatus;
|
|
22
|
+
paymentMethod: TicketOrderPaymentMethod;
|
|
23
|
+
amount: number;
|
|
24
|
+
unitValue: number;
|
|
25
|
+
totalValue: number;
|
|
26
|
+
coupons: string[];
|
|
27
|
+
createdAtDateTime: Date;
|
|
28
|
+
updatedAtDateTime: Date;
|
|
29
|
+
}
|
|
30
|
+
export declare const TicketOrderSchema: Schema<ITicketOrder, import("mongoose").Model<ITicketOrder, any, any, any, import("mongoose").Document<unknown, any, ITicketOrder, any> & ITicketOrder & Required<{
|
|
31
|
+
_id: Types.ObjectId;
|
|
32
|
+
}> & {
|
|
33
|
+
__v: number;
|
|
34
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITicketOrder, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITicketOrder>, {}> & import("mongoose").FlatRecord<ITicketOrder> & Required<{
|
|
35
|
+
_id: Types.ObjectId;
|
|
36
|
+
}> & {
|
|
37
|
+
__v: number;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketOrderSchema = exports.TicketOrderStatus = exports.TicketOrderPaymentMethod = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var TicketOrderPaymentMethod;
|
|
6
|
+
(function (TicketOrderPaymentMethod) {
|
|
7
|
+
TicketOrderPaymentMethod["CREDITS"] = "CREDITS";
|
|
8
|
+
TicketOrderPaymentMethod["CREDIT_CARD"] = "CREDIT_CARD";
|
|
9
|
+
TicketOrderPaymentMethod["DEBIT_CARD"] = "DEBIT_CARD";
|
|
10
|
+
TicketOrderPaymentMethod["PIX"] = "PIX";
|
|
11
|
+
})(TicketOrderPaymentMethod || (exports.TicketOrderPaymentMethod = TicketOrderPaymentMethod = {}));
|
|
12
|
+
var TicketOrderStatus;
|
|
13
|
+
(function (TicketOrderStatus) {
|
|
14
|
+
TicketOrderStatus["DRAFT"] = "DRAFT";
|
|
15
|
+
TicketOrderStatus["PENDING"] = "PENDING";
|
|
16
|
+
TicketOrderStatus["PAID"] = "PAID";
|
|
17
|
+
TicketOrderStatus["CANCELLED"] = "CANCELLED";
|
|
18
|
+
})(TicketOrderStatus || (exports.TicketOrderStatus = TicketOrderStatus = {}));
|
|
19
|
+
exports.TicketOrderSchema = new mongoose_1.Schema({
|
|
20
|
+
sequenceNumber: { type: Number, required: true },
|
|
21
|
+
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
|
|
22
|
+
challenge: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge", required: true },
|
|
23
|
+
status: { type: String, required: true, enum: TicketOrderStatus },
|
|
24
|
+
paymentMethod: { type: String, required: true, enum: TicketOrderPaymentMethod },
|
|
25
|
+
amount: { type: Number, required: true },
|
|
26
|
+
unitValue: { type: Number, required: true },
|
|
27
|
+
totalValue: { type: Number, required: true },
|
|
28
|
+
coupons: { type: [String], required: true },
|
|
29
|
+
}, {
|
|
30
|
+
timestamps: {
|
|
31
|
+
createdAt: "createdAtDateTime",
|
|
32
|
+
updatedAt: "updatedAtDateTime"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
exports.TicketOrderSchema.index({ account: 1 });
|
|
36
|
+
exports.TicketOrderSchema.index({ challenge: 1 });
|
|
37
|
+
exports.TicketOrderSchema.index({ status: 1 });
|
|
38
|
+
exports.TicketOrderSchema.index({ paymentMethod: 1 });
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
package/package.json
CHANGED