c2-desafiox 1.0.121 → 1.0.122
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/Challenge.d.ts +28 -0
- package/dist/models/Challenge.js +13 -1
- package/package.json +1 -1
|
@@ -5,6 +5,15 @@ import { IChampionshipRound } from "./ChampionshipRound";
|
|
|
5
5
|
import { IFile } from "./File";
|
|
6
6
|
import { ChallengeRoundStatus } from "../types/ChallengeRoundStatus";
|
|
7
7
|
import { ITicket } from "./Ticket";
|
|
8
|
+
export declare enum ChallengeType {
|
|
9
|
+
SURVIVAL = "SURVIVAL",
|
|
10
|
+
RANKING = "RANKING"
|
|
11
|
+
}
|
|
12
|
+
export interface IChallengePricing {
|
|
13
|
+
initDateTime: Date;
|
|
14
|
+
endDateTime: Date;
|
|
15
|
+
value: number;
|
|
16
|
+
}
|
|
8
17
|
export interface IChallenge {
|
|
9
18
|
_id: Types.ObjectId;
|
|
10
19
|
name: string;
|
|
@@ -17,7 +26,15 @@ export interface IChallenge {
|
|
|
17
26
|
thumb: IFile;
|
|
18
27
|
budgetInitial: number;
|
|
19
28
|
budgetAccumulated: number;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
* Use pricing instead
|
|
32
|
+
*/
|
|
20
33
|
ticketValue: number;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
* Use pricing instead
|
|
37
|
+
*/
|
|
21
38
|
ticketsLimitDateTime: Date;
|
|
22
39
|
totalTicketsPaid: number;
|
|
23
40
|
totalTicketsInGamming: number;
|
|
@@ -29,7 +46,18 @@ export interface IChallenge {
|
|
|
29
46
|
createdAtDateTime: Date;
|
|
30
47
|
updatedAtDateTime: Date;
|
|
31
48
|
status: ChallengeStatus;
|
|
49
|
+
type: ChallengeType;
|
|
50
|
+
pricing: IChallengePricing[];
|
|
32
51
|
}
|
|
52
|
+
export declare const ChallengePricingSchema: Schema<IChallengePricing, import("mongoose").Model<IChallengePricing, any, any, any, import("mongoose").Document<unknown, any, IChallengePricing, any> & IChallengePricing & {
|
|
53
|
+
_id: Types.ObjectId;
|
|
54
|
+
} & {
|
|
55
|
+
__v: number;
|
|
56
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChallengePricing, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChallengePricing>, {}> & import("mongoose").FlatRecord<IChallengePricing> & {
|
|
57
|
+
_id: Types.ObjectId;
|
|
58
|
+
} & {
|
|
59
|
+
__v: number;
|
|
60
|
+
}>;
|
|
33
61
|
export declare const ChallengeSchema: Schema<IChallenge, import("mongoose").Model<IChallenge, any, any, any, import("mongoose").Document<unknown, any, IChallenge, any> & IChallenge & Required<{
|
|
34
62
|
_id: Types.ObjectId;
|
|
35
63
|
}> & {
|
package/dist/models/Challenge.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChallengeSchema = void 0;
|
|
3
|
+
exports.ChallengeSchema = exports.ChallengePricingSchema = exports.ChallengeType = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const ChallengeStatus_1 = require("../types/ChallengeStatus");
|
|
6
6
|
const File_1 = require("./File");
|
|
7
7
|
const ChallengeRoundStatus_1 = require("../types/ChallengeRoundStatus");
|
|
8
|
+
var ChallengeType;
|
|
9
|
+
(function (ChallengeType) {
|
|
10
|
+
ChallengeType["SURVIVAL"] = "SURVIVAL";
|
|
11
|
+
ChallengeType["RANKING"] = "RANKING";
|
|
12
|
+
})(ChallengeType || (exports.ChallengeType = ChallengeType = {}));
|
|
13
|
+
exports.ChallengePricingSchema = new mongoose_1.Schema({
|
|
14
|
+
initDateTime: { type: Date, required: true },
|
|
15
|
+
endDateTime: { type: Date, required: true },
|
|
16
|
+
value: { type: Number, required: true },
|
|
17
|
+
});
|
|
8
18
|
exports.ChallengeSchema = new mongoose_1.Schema({
|
|
9
19
|
name: { type: String, required: true },
|
|
10
20
|
slug: { type: String, required: true },
|
|
@@ -30,6 +40,8 @@ exports.ChallengeSchema = new mongoose_1.Schema({
|
|
|
30
40
|
roundEndIndex: { type: Number, required: false },
|
|
31
41
|
totalTicketsPaid: { type: Number, required: false },
|
|
32
42
|
totalTicketsInGamming: { type: Number, required: false },
|
|
43
|
+
type: { type: String, enum: ChallengeType, required: true, default: ChallengeType.SURVIVAL },
|
|
44
|
+
pricing: { type: [exports.ChallengePricingSchema], required: false },
|
|
33
45
|
}, {
|
|
34
46
|
timestamps: {
|
|
35
47
|
createdAt: "createdAtDateTime",
|
package/package.json
CHANGED