c2-climbing-x 1.0.24 → 1.0.26
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 +0 -18
- package/dist/models/Ticket.js +1 -12
- package/dist/models/TicketGuess.d.ts +25 -0
- package/dist/models/TicketGuess.js +21 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
package/dist/models/Ticket.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IAccount } from "./Account";
|
|
3
3
|
import { IChallenge } from "./Challenge";
|
|
4
|
-
import { ITeam } from "./Team";
|
|
5
|
-
import { IChallengeRound } from "./ChallengeRound";
|
|
6
4
|
export declare enum TicketStatus {
|
|
7
5
|
READY = "READY",
|
|
8
6
|
SCALLING = "SCALLING",
|
|
@@ -15,23 +13,7 @@ export interface ITicket {
|
|
|
15
13
|
status: TicketStatus;
|
|
16
14
|
createdAtDateTime: Date;
|
|
17
15
|
updatedAtDateTime: Date;
|
|
18
|
-
guesses: ITicketGuess[];
|
|
19
16
|
}
|
|
20
|
-
export interface ITicketGuess {
|
|
21
|
-
challengeRound: Types.ObjectId | IChallengeRound;
|
|
22
|
-
team: Types.ObjectId | ITeam;
|
|
23
|
-
createdAtDateTime: Date;
|
|
24
|
-
updatedAtDateTime: Date;
|
|
25
|
-
}
|
|
26
|
-
export declare const TicketGuessSchema: Schema<ITicketGuess, import("mongoose").Model<ITicketGuess, any, any, any, import("mongoose").Document<unknown, any, ITicketGuess, any> & ITicketGuess & {
|
|
27
|
-
_id: Types.ObjectId;
|
|
28
|
-
} & {
|
|
29
|
-
__v: number;
|
|
30
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITicketGuess, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITicketGuess>, {}> & import("mongoose").FlatRecord<ITicketGuess> & {
|
|
31
|
-
_id: Types.ObjectId;
|
|
32
|
-
} & {
|
|
33
|
-
__v: number;
|
|
34
|
-
}>;
|
|
35
17
|
export declare const TicketSchema: Schema<ITicket, import("mongoose").Model<ITicket, any, any, any, import("mongoose").Document<unknown, any, ITicket, any> & ITicket & Required<{
|
|
36
18
|
_id: Types.ObjectId;
|
|
37
19
|
}> & {
|
package/dist/models/Ticket.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TicketSchema = exports.
|
|
3
|
+
exports.TicketSchema = exports.TicketStatus = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
var TicketStatus;
|
|
6
6
|
(function (TicketStatus) {
|
|
@@ -8,22 +8,11 @@ var TicketStatus;
|
|
|
8
8
|
TicketStatus["SCALLING"] = "SCALLING";
|
|
9
9
|
TicketStatus["DROPPED"] = "DROPPED";
|
|
10
10
|
})(TicketStatus || (exports.TicketStatus = TicketStatus = {}));
|
|
11
|
-
exports.TicketGuessSchema = new mongoose_1.Schema({
|
|
12
|
-
challengeRound: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge-round", required: true },
|
|
13
|
-
team: { type: mongoose_1.Schema.Types.ObjectId, ref: "team", required: true },
|
|
14
|
-
}, {
|
|
15
|
-
timestamps: {
|
|
16
|
-
createdAt: "createdAtDateTime",
|
|
17
|
-
updatedAt: "updatedAtDateTime"
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
11
|
exports.TicketSchema = new mongoose_1.Schema({
|
|
21
12
|
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
|
|
22
13
|
challenge: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge", required: true },
|
|
23
14
|
status: { type: String, required: true, enum: TicketStatus },
|
|
24
|
-
guesses: [{ type: exports.TicketGuessSchema }],
|
|
25
15
|
});
|
|
26
16
|
exports.TicketSchema.index({ account: 1 });
|
|
27
17
|
exports.TicketSchema.index({ challenge: 1 });
|
|
28
18
|
exports.TicketSchema.index({ status: 1 });
|
|
29
|
-
exports.TicketSchema.index({ teams: 1 });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IAccount } from "./Account";
|
|
3
|
+
import { IChallenge } from "./Challenge";
|
|
4
|
+
import { ITeam } from "./Team";
|
|
5
|
+
import { IChallengeRound } from "./ChallengeRound";
|
|
6
|
+
import { ITicket } from "./Ticket";
|
|
7
|
+
export interface ITicketGuess {
|
|
8
|
+
_id: Types.ObjectId;
|
|
9
|
+
account: Types.ObjectId | IAccount;
|
|
10
|
+
challenge: Types.ObjectId | IChallenge;
|
|
11
|
+
challengeRound: Types.ObjectId | IChallengeRound;
|
|
12
|
+
ticket: Types.ObjectId | ITicket;
|
|
13
|
+
guess: Types.ObjectId | ITeam;
|
|
14
|
+
createdAtDateTime: Date;
|
|
15
|
+
updatedAtDateTime: Date;
|
|
16
|
+
}
|
|
17
|
+
export declare const TicketGuessSchema: Schema<ITicketGuess, import("mongoose").Model<ITicketGuess, any, any, any, import("mongoose").Document<unknown, any, ITicketGuess, any> & ITicketGuess & Required<{
|
|
18
|
+
_id: Types.ObjectId;
|
|
19
|
+
}> & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITicketGuess, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITicketGuess>, {}> & import("mongoose").FlatRecord<ITicketGuess> & Required<{
|
|
22
|
+
_id: Types.ObjectId;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketGuessSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.TicketGuessSchema = new mongoose_1.Schema({
|
|
6
|
+
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
|
|
7
|
+
challenge: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge", required: true },
|
|
8
|
+
challengeRound: { type: mongoose_1.Schema.Types.ObjectId, ref: "challenge-round", required: true },
|
|
9
|
+
ticket: { type: mongoose_1.Schema.Types.ObjectId, ref: "ticket", required: true },
|
|
10
|
+
guess: { type: mongoose_1.Schema.Types.ObjectId, ref: "team", required: true },
|
|
11
|
+
}, {
|
|
12
|
+
timestamps: {
|
|
13
|
+
createdAt: "createdAtDateTime",
|
|
14
|
+
updatedAt: "updatedAtDateTime"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
exports.TicketGuessSchema.index({ account: 1 });
|
|
18
|
+
exports.TicketGuessSchema.index({ challenge: 1 });
|
|
19
|
+
exports.TicketGuessSchema.index({ challengeRound: 1 });
|
|
20
|
+
exports.TicketGuessSchema.index({ ticket: 1 });
|
|
21
|
+
exports.TicketGuessSchema.index({ team: 1 });
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -21,3 +21,5 @@ __exportStar(require("./ChampionshipMatch"), exports);
|
|
|
21
21
|
__exportStar(require("./ChampionshipPhase"), exports);
|
|
22
22
|
__exportStar(require("./ChampionshipRound"), exports);
|
|
23
23
|
__exportStar(require("./Team"), exports);
|
|
24
|
+
__exportStar(require("./Ticket"), exports);
|
|
25
|
+
__exportStar(require("./TicketGuess"), exports);
|
package/package.json
CHANGED