c2-climbing-x 1.0.21 → 1.0.23
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 +2 -0
- package/dist/models/Challenge.js +3 -1
- package/dist/models/ChallengeRound.d.ts +2 -0
- package/dist/models/ChallengeRound.js +7 -1
- package/dist/types/ChallengeStatus.d.ts +5 -0
- package/dist/types/ChallengeStatus.js +9 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +3 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IChampionship } from "./Championship";
|
|
3
3
|
import { IChampionshipRound } from "./ChampionshipRound";
|
|
4
|
+
import { ChallengeStatus } from "../types/ChallengeStatus";
|
|
4
5
|
export interface IChallenge {
|
|
5
6
|
_id: Types.ObjectId;
|
|
6
7
|
name: string;
|
|
@@ -11,6 +12,7 @@ export interface IChallenge {
|
|
|
11
12
|
roundEnd: IChampionshipRound;
|
|
12
13
|
createdAtDateTime: Date;
|
|
13
14
|
updatedAtDateTime: Date;
|
|
15
|
+
status: ChallengeStatus;
|
|
14
16
|
}
|
|
15
17
|
export declare const ChallengeSchema: Schema<IChallenge, import("mongoose").Model<IChallenge, any, any, any, import("mongoose").Document<unknown, any, IChallenge, any> & IChallenge & Required<{
|
|
16
18
|
_id: Types.ObjectId;
|
package/dist/models/Challenge.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChallengeSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
+
const ChallengeStatus_1 = require("../types/ChallengeStatus");
|
|
5
6
|
exports.ChallengeSchema = new mongoose_1.Schema({
|
|
6
7
|
name: { type: String, required: true },
|
|
7
8
|
slug: { type: String, required: true },
|
|
@@ -12,7 +13,8 @@ exports.ChallengeSchema = new mongoose_1.Schema({
|
|
|
12
13
|
required: true
|
|
13
14
|
},
|
|
14
15
|
roundStart: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true },
|
|
15
|
-
roundEnd: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true }
|
|
16
|
+
roundEnd: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true },
|
|
17
|
+
status: { type: String, enum: ChallengeStatus_1.ChallengeStatus, default: ChallengeStatus_1.ChallengeStatus.PENDING }
|
|
16
18
|
}, {
|
|
17
19
|
timestamps: {
|
|
18
20
|
createdAt: "createdAtDateTime",
|
|
@@ -2,9 +2,11 @@ import { Schema, Types } from "mongoose";
|
|
|
2
2
|
import { IChallenge } from "./Challenge";
|
|
3
3
|
import { IChampionshipMatch } from "./ChampionshipMatch";
|
|
4
4
|
import { IChampionshipRound } from "./ChampionshipRound";
|
|
5
|
+
import { ITeam } from "./Team";
|
|
5
6
|
export interface IChallengeMatch {
|
|
6
7
|
match: Types.ObjectId | IChampionshipMatch;
|
|
7
8
|
enabled: boolean;
|
|
9
|
+
teamWinner?: Types.ObjectId | ITeam;
|
|
8
10
|
}
|
|
9
11
|
export interface IChallengeRound {
|
|
10
12
|
_id: Types.ObjectId;
|
|
@@ -5,6 +5,7 @@ const mongoose_1 = require("mongoose");
|
|
|
5
5
|
exports.ChallengeMatchSchema = new mongoose_1.Schema({
|
|
6
6
|
match: { type: mongoose_1.Schema.Types.ObjectId, ref: "match", required: true },
|
|
7
7
|
enabled: { type: Boolean, required: true, default: true },
|
|
8
|
+
teamWinner: { type: mongoose_1.Schema.Types.ObjectId, ref: "team", required: false }
|
|
8
9
|
}, { _id: false });
|
|
9
10
|
exports.ChallengeRoundSchema = new mongoose_1.Schema({
|
|
10
11
|
challenge: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge", required: true },
|
|
@@ -12,4 +13,9 @@ exports.ChallengeRoundSchema = new mongoose_1.Schema({
|
|
|
12
13
|
matches: [{ type: exports.ChallengeMatchSchema }],
|
|
13
14
|
enabled: { type: Boolean, required: true, default: true },
|
|
14
15
|
sequenceOrder: { type: Number, required: false }
|
|
15
|
-
}, {
|
|
16
|
+
}, {
|
|
17
|
+
timestamps: {
|
|
18
|
+
createdAt: "createdAtDateTime",
|
|
19
|
+
updatedAt: "updatedAtDateTime"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChallengeStatus = void 0;
|
|
4
|
+
var ChallengeStatus;
|
|
5
|
+
(function (ChallengeStatus) {
|
|
6
|
+
ChallengeStatus["PENDING"] = "PENDING";
|
|
7
|
+
ChallengeStatus["ACTIVE"] = "ACTIVE";
|
|
8
|
+
ChallengeStatus["COMPLETED"] = "COMPLETED";
|
|
9
|
+
})(ChallengeStatus || (exports.ChallengeStatus = ChallengeStatus = {}));
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QualificationMode = exports.GroupMatchMode = exports.Modality = exports.MatchStatus = exports.RoundStatus = exports.PhaseType = void 0;
|
|
3
|
+
exports.ChallengeStatus = exports.QualificationMode = exports.GroupMatchMode = exports.Modality = exports.MatchStatus = exports.RoundStatus = exports.PhaseType = void 0;
|
|
4
4
|
var PhaseType_1 = require("./PhaseType");
|
|
5
5
|
Object.defineProperty(exports, "PhaseType", { enumerable: true, get: function () { return PhaseType_1.PhaseType; } });
|
|
6
6
|
var RoundStatus_1 = require("./RoundStatus");
|
|
@@ -13,3 +13,5 @@ var GroupMatchMode_1 = require("./GroupMatchMode");
|
|
|
13
13
|
Object.defineProperty(exports, "GroupMatchMode", { enumerable: true, get: function () { return GroupMatchMode_1.GroupMatchMode; } });
|
|
14
14
|
var QualificationMode_1 = require("./QualificationMode");
|
|
15
15
|
Object.defineProperty(exports, "QualificationMode", { enumerable: true, get: function () { return QualificationMode_1.QualificationMode; } });
|
|
16
|
+
var ChallengeStatus_1 = require("./ChallengeStatus");
|
|
17
|
+
Object.defineProperty(exports, "ChallengeStatus", { enumerable: true, get: function () { return ChallengeStatus_1.ChallengeStatus; } });
|
package/package.json
CHANGED