c2-climbing-x 1.0.1 → 1.0.4
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 +10 -2
- package/dist/models/Challenge.js +4 -5
- package/dist/models/ChallengeRound.d.ts +11 -3
- package/dist/models/ChallengeRound.js +4 -5
- package/dist/models/Championship.d.ts +11 -3
- package/dist/models/Championship.js +4 -5
- package/dist/models/ChampionshipMatch.d.ts +11 -3
- package/dist/models/ChampionshipMatch.js +4 -5
- package/dist/models/ChampionshipPhase.d.ts +37 -2
- package/dist/models/ChampionshipPhase.js +10 -11
- package/dist/models/ChampionshipRound.d.ts +10 -2
- package/dist/models/ChampionshipRound.js +5 -6
- package/dist/models/Team.d.ts +10 -2
- package/dist/models/Team.js +4 -5
- package/dist/models/index.d.ts +7 -7
- package/dist/models/index.js +21 -15
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IChampionship } from "./Championship";
|
|
3
3
|
export interface IChallenge {
|
|
4
4
|
_id: Types.ObjectId;
|
|
@@ -8,4 +8,12 @@ export interface IChallenge {
|
|
|
8
8
|
createdAtDateTime: Date;
|
|
9
9
|
updatedAtDateTime: Date;
|
|
10
10
|
}
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const ChallengeSchema: Schema<IChallenge, import("mongoose").Model<IChallenge, any, any, any, import("mongoose").Document<unknown, any, IChallenge, any> & IChallenge & Required<{
|
|
12
|
+
_id: Types.ObjectId;
|
|
13
|
+
}> & {
|
|
14
|
+
__v: number;
|
|
15
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChallenge, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChallenge>, {}> & import("mongoose").FlatRecord<IChallenge> & Required<{
|
|
16
|
+
_id: Types.ObjectId;
|
|
17
|
+
}> & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}>;
|
package/dist/models/Challenge.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChallengeSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
|
|
5
|
+
exports.ChallengeSchema = new mongoose_1.Schema({
|
|
6
6
|
championship: {
|
|
7
7
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
8
|
ref: "championship",
|
|
@@ -16,6 +16,5 @@ const ChallengeSchema = new mongoose_1.Schema({
|
|
|
16
16
|
updatedAt: "updatedAtDateTime"
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
ChallengeSchema.index({ championship: 1 });
|
|
20
|
-
ChallengeSchema.index({ championship: 1, roundStart: 1, roundEnd: 1 });
|
|
21
|
-
exports.ChallengeModel = (0, mongoose_1.model)("challenge", ChallengeSchema);
|
|
19
|
+
exports.ChallengeSchema.index({ championship: 1 });
|
|
20
|
+
exports.ChallengeSchema.index({ championship: 1, roundStart: 1, roundEnd: 1 });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IChallenge } from "./Challenge";
|
|
3
|
-
import { IChampionshipRound } from "./ChampionshipRound";
|
|
4
3
|
import { IChampionshipMatch } from "./ChampionshipMatch";
|
|
4
|
+
import { IChampionshipRound } from "./ChampionshipRound";
|
|
5
5
|
export interface IChallengeRound {
|
|
6
6
|
_id: Types.ObjectId;
|
|
7
7
|
challenge: Types.ObjectId | IChallenge;
|
|
@@ -12,4 +12,12 @@ export interface IChallengeRound {
|
|
|
12
12
|
createdAtDateTime: Date;
|
|
13
13
|
updatedAtDateTime: Date;
|
|
14
14
|
}
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const ChallengeRoundSchema: Schema<IChallengeRound, import("mongoose").Model<IChallengeRound, any, any, any, import("mongoose").Document<unknown, any, IChallengeRound, any> & IChallengeRound & Required<{
|
|
16
|
+
_id: Types.ObjectId;
|
|
17
|
+
}> & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChallengeRound, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChallengeRound>, {}> & import("mongoose").FlatRecord<IChallengeRound> & Required<{
|
|
20
|
+
_id: Types.ObjectId;
|
|
21
|
+
}> & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChallengeRoundSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
|
|
5
|
+
exports.ChallengeRoundSchema = new mongoose_1.Schema({
|
|
6
6
|
challenge: {
|
|
7
7
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
8
|
ref: "challenge",
|
|
@@ -18,6 +18,5 @@ const ChallengeRoundSchema = new mongoose_1.Schema({
|
|
|
18
18
|
updatedAt: "updatedAtDateTime"
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
ChallengeRoundSchema.index({ challenge: 1 });
|
|
22
|
-
ChallengeRoundSchema.index({ challenge: 1, round: 1 }, { unique: true });
|
|
23
|
-
exports.ChallengeRoundModel = (0, mongoose_1.model)("challenge-round", ChallengeRoundSchema);
|
|
21
|
+
exports.ChallengeRoundSchema.index({ challenge: 1 });
|
|
22
|
+
exports.ChallengeRoundSchema.index({ challenge: 1, round: 1 }, { unique: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ITeam } from "./Team";
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
3
2
|
import { Modality } from "../types/Modality";
|
|
3
|
+
import { ITeam } from "./Team";
|
|
4
4
|
export interface IChampionship {
|
|
5
5
|
_id: Types.ObjectId;
|
|
6
6
|
name: string;
|
|
@@ -12,4 +12,12 @@ export interface IChampionship {
|
|
|
12
12
|
createdAtDateTime: Date;
|
|
13
13
|
updatedAtDateTime: Date;
|
|
14
14
|
}
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const ChampionshipSchema: Schema<IChampionship, import("mongoose").Model<IChampionship, any, any, any, import("mongoose").Document<unknown, any, IChampionship, any> & IChampionship & Required<{
|
|
16
|
+
_id: Types.ObjectId;
|
|
17
|
+
}> & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChampionship, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChampionship>, {}> & import("mongoose").FlatRecord<IChampionship> & Required<{
|
|
20
|
+
_id: Types.ObjectId;
|
|
21
|
+
}> & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChampionshipSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const Modality_1 = require("../types/Modality");
|
|
6
|
-
|
|
6
|
+
exports.ChampionshipSchema = new mongoose_1.Schema({
|
|
7
7
|
name: { type: String, required: true },
|
|
8
8
|
slug: { type: String, required: false },
|
|
9
9
|
startDate: { type: Date, required: false },
|
|
@@ -16,6 +16,5 @@ const ChampionshipSchema = new mongoose_1.Schema({
|
|
|
16
16
|
updatedAt: "updatedAtDateTime"
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
ChampionshipSchema.index({ slug: 1 }, { unique: true, sparse: true });
|
|
20
|
-
ChampionshipSchema.index({ modality: 1 });
|
|
21
|
-
exports.ChampionshipModel = (0, mongoose_1.model)("championship", ChampionshipSchema);
|
|
19
|
+
exports.ChampionshipSchema.index({ slug: 1 }, { unique: true, sparse: true });
|
|
20
|
+
exports.ChampionshipSchema.index({ modality: 1 });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { MatchStatus } from "../types/MatchStatus";
|
|
3
|
+
import { IChampionshipPhase } from "./ChampionshipPhase";
|
|
3
4
|
import { IChampionshipRound } from "./ChampionshipRound";
|
|
4
5
|
import { ITeam } from "./Team";
|
|
5
|
-
import { IChampionshipPhase } from "./ChampionshipPhase";
|
|
6
6
|
export interface IChampionshipMatch {
|
|
7
7
|
_id: Types.ObjectId;
|
|
8
8
|
number: number;
|
|
@@ -18,4 +18,12 @@ export interface IChampionshipMatch {
|
|
|
18
18
|
createdAtDateTime: Date;
|
|
19
19
|
updatedAtDateTime: Date;
|
|
20
20
|
}
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const ChampionshipMatchSchema: Schema<IChampionshipMatch, import("mongoose").Model<IChampionshipMatch, any, any, any, import("mongoose").Document<unknown, any, IChampionshipMatch, any> & IChampionshipMatch & Required<{
|
|
22
|
+
_id: Types.ObjectId;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChampionshipMatch, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChampionshipMatch>, {}> & import("mongoose").FlatRecord<IChampionshipMatch> & Required<{
|
|
26
|
+
_id: Types.ObjectId;
|
|
27
|
+
}> & {
|
|
28
|
+
__v: number;
|
|
29
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChampionshipMatchSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const MatchStatus_1 = require("../types/MatchStatus");
|
|
6
|
-
|
|
6
|
+
exports.ChampionshipMatchSchema = new mongoose_1.Schema({
|
|
7
7
|
number: { type: Number, required: true },
|
|
8
8
|
phase: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-phase", required: true },
|
|
9
9
|
round: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true },
|
|
@@ -24,6 +24,5 @@ const ChampionshipMatchSchema = new mongoose_1.Schema({
|
|
|
24
24
|
updatedAt: "updatedAtDateTime"
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
ChampionshipMatchSchema.index({ round: 1 });
|
|
28
|
-
ChampionshipMatchSchema.index({ round: 1, homeTeam: 1, awayTeam: 1 }, { unique: true });
|
|
29
|
-
exports.MatchModel = (0, mongoose_1.model)("championship-match", ChampionshipMatchSchema);
|
|
27
|
+
exports.ChampionshipMatchSchema.index({ round: 1 });
|
|
28
|
+
exports.ChampionshipMatchSchema.index({ round: 1, homeTeam: 1, awayTeam: 1 }, { unique: true });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { GroupMatchMode } from "../types/GroupMatchMode";
|
|
3
3
|
import { QualificationMode } from "../types/QualificationMode";
|
|
4
4
|
import { IChampionship } from "./Championship";
|
|
@@ -32,4 +32,39 @@ export interface IQualifiedRule {
|
|
|
32
32
|
position: number;
|
|
33
33
|
limit: number;
|
|
34
34
|
}
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const PhaseParticipantSchema: Schema<IPhaseParticipant, import("mongoose").Model<IPhaseParticipant, any, any, any, import("mongoose").Document<unknown, any, IPhaseParticipant, any> & IPhaseParticipant & {
|
|
36
|
+
_id: Types.ObjectId;
|
|
37
|
+
} & {
|
|
38
|
+
__v: number;
|
|
39
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IPhaseParticipant, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IPhaseParticipant>, {}> & import("mongoose").FlatRecord<IPhaseParticipant> & {
|
|
40
|
+
_id: Types.ObjectId;
|
|
41
|
+
} & {
|
|
42
|
+
__v: number;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const QualifiedRuleSchema: Schema<IQualifiedRule, import("mongoose").Model<IQualifiedRule, any, any, any, import("mongoose").Document<unknown, any, IQualifiedRule, any> & IQualifiedRule & {
|
|
45
|
+
_id: Types.ObjectId;
|
|
46
|
+
} & {
|
|
47
|
+
__v: number;
|
|
48
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IQualifiedRule, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IQualifiedRule>, {}> & import("mongoose").FlatRecord<IQualifiedRule> & {
|
|
49
|
+
_id: Types.ObjectId;
|
|
50
|
+
} & {
|
|
51
|
+
__v: number;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const MatchRulesSchema: Schema<IMatchRules, import("mongoose").Model<IMatchRules, any, any, any, import("mongoose").Document<unknown, any, IMatchRules, any> & IMatchRules & {
|
|
54
|
+
_id: Types.ObjectId;
|
|
55
|
+
} & {
|
|
56
|
+
__v: number;
|
|
57
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IMatchRules, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IMatchRules>, {}> & import("mongoose").FlatRecord<IMatchRules> & {
|
|
58
|
+
_id: Types.ObjectId;
|
|
59
|
+
} & {
|
|
60
|
+
__v: number;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const ChampionshipPhaseSchema: Schema<IChampionshipPhase, import("mongoose").Model<IChampionshipPhase, any, any, any, import("mongoose").Document<unknown, any, IChampionshipPhase, any> & IChampionshipPhase & Required<{
|
|
63
|
+
_id: Types.ObjectId;
|
|
64
|
+
}> & {
|
|
65
|
+
__v: number;
|
|
66
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChampionshipPhase, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChampionshipPhase>, {}> & import("mongoose").FlatRecord<IChampionshipPhase> & Required<{
|
|
67
|
+
_id: Types.ObjectId;
|
|
68
|
+
}> & {
|
|
69
|
+
__v: number;
|
|
70
|
+
}>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChampionshipPhaseSchema = exports.MatchRulesSchema = exports.QualifiedRuleSchema = exports.PhaseParticipantSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const GroupMatchMode_1 = require("../types/GroupMatchMode");
|
|
6
6
|
const QualificationMode_1 = require("../types/QualificationMode");
|
|
7
|
-
|
|
7
|
+
exports.PhaseParticipantSchema = new mongoose_1.Schema({
|
|
8
8
|
team: { type: mongoose_1.Schema.Types.ObjectId, ref: "team", required: true },
|
|
9
9
|
group: { type: String, required: false }
|
|
10
10
|
}, { _id: false });
|
|
11
|
-
|
|
11
|
+
exports.QualifiedRuleSchema = new mongoose_1.Schema({
|
|
12
12
|
priority: { type: Number, required: true },
|
|
13
13
|
mode: { type: String, required: true, enum: QualificationMode_1.QualificationMode },
|
|
14
14
|
position: { type: Number, required: true },
|
|
15
15
|
limit: { type: Number, required: true },
|
|
16
16
|
});
|
|
17
|
-
|
|
17
|
+
exports.MatchRulesSchema = new mongoose_1.Schema({
|
|
18
18
|
mode: { type: String, required: true, enum: GroupMatchMode_1.GroupMatchMode },
|
|
19
19
|
twoLegs: { type: Boolean, required: true, default: false },
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
exports.ChampionshipPhaseSchema = new mongoose_1.Schema({
|
|
22
22
|
description: { type: String, required: true },
|
|
23
23
|
championship: {
|
|
24
24
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -26,15 +26,14 @@ const ChampionshipPhaseSchema = new mongoose_1.Schema({
|
|
|
26
26
|
required: true
|
|
27
27
|
},
|
|
28
28
|
order: { type: Number, required: true },
|
|
29
|
-
participants: { type: [PhaseParticipantSchema], required: true, default: [] },
|
|
30
|
-
matchRules: { type: MatchRulesSchema, required: true },
|
|
31
|
-
qualifiedRules: { type: [QualifiedRuleSchema], required: true }
|
|
29
|
+
participants: { type: [exports.PhaseParticipantSchema], required: true, default: [] },
|
|
30
|
+
matchRules: { type: exports.MatchRulesSchema, required: true },
|
|
31
|
+
qualifiedRules: { type: [exports.QualifiedRuleSchema], required: true }
|
|
32
32
|
}, {
|
|
33
33
|
timestamps: {
|
|
34
34
|
createdAt: "createdAtDateTime",
|
|
35
35
|
updatedAt: "updatedAtDateTime"
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
ChampionshipPhaseSchema.index({ championship: 1 });
|
|
39
|
-
ChampionshipPhaseSchema.index({ championship: 1, order: 1 }, { unique: true });
|
|
40
|
-
exports.ChampionshipPhaseModel = (0, mongoose_1.model)("championship-phase", ChampionshipPhaseSchema);
|
|
38
|
+
exports.ChampionshipPhaseSchema.index({ championship: 1 });
|
|
39
|
+
exports.ChampionshipPhaseSchema.index({ championship: 1, order: 1 }, { unique: true });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { RoundStatus } from "../types/RoundStatus";
|
|
3
3
|
import { IChampionshipPhase } from "./ChampionshipPhase";
|
|
4
4
|
import { IChampionship } from "./Championship";
|
|
@@ -15,4 +15,12 @@ export interface IChampionshipRound {
|
|
|
15
15
|
createdAtDateTime: Date;
|
|
16
16
|
updatedAtDateTime: Date;
|
|
17
17
|
}
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const ChampionshipRoundSchema: Schema<IChampionshipRound, import("mongoose").Model<IChampionshipRound, any, any, any, import("mongoose").Document<unknown, any, IChampionshipRound, any> & IChampionshipRound & Required<{
|
|
19
|
+
_id: Types.ObjectId;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IChampionshipRound, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IChampionshipRound>, {}> & import("mongoose").FlatRecord<IChampionshipRound> & Required<{
|
|
23
|
+
_id: Types.ObjectId;
|
|
24
|
+
}> & {
|
|
25
|
+
__v: number;
|
|
26
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChampionshipRoundSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const RoundStatus_1 = require("../types/RoundStatus");
|
|
6
|
-
|
|
6
|
+
exports.ChampionshipRoundSchema = new mongoose_1.Schema({
|
|
7
7
|
phase: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-phase", required: true },
|
|
8
8
|
championship: {
|
|
9
9
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -26,7 +26,6 @@ const ChampionshipRoundSchema = new mongoose_1.Schema({
|
|
|
26
26
|
updatedAt: "updatedAtDateTime"
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
ChampionshipRoundSchema.index({ phase: 1 });
|
|
30
|
-
ChampionshipRoundSchema.index({ championship: 1 });
|
|
31
|
-
ChampionshipRoundSchema.index({ championship: 1, globalRoundIndex: 1 }, { unique: true });
|
|
32
|
-
exports.ChampionshipRoundModel = (0, mongoose_1.model)("championship-round", ChampionshipRoundSchema);
|
|
29
|
+
exports.ChampionshipRoundSchema.index({ phase: 1 });
|
|
30
|
+
exports.ChampionshipRoundSchema.index({ championship: 1 });
|
|
31
|
+
exports.ChampionshipRoundSchema.index({ championship: 1, globalRoundIndex: 1 }, { unique: true });
|
package/dist/models/Team.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { Modality } from "../types/Modality";
|
|
3
3
|
export interface ITeam {
|
|
4
4
|
_id: Types.ObjectId;
|
|
@@ -10,4 +10,12 @@ export interface ITeam {
|
|
|
10
10
|
createdAtDateTime: Date;
|
|
11
11
|
updatedAtDateTime: Date;
|
|
12
12
|
}
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const TeamSchema: Schema<ITeam, import("mongoose").Model<ITeam, any, any, any, import("mongoose").Document<unknown, any, ITeam, any> & ITeam & Required<{
|
|
14
|
+
_id: Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITeam, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ITeam>, {}> & import("mongoose").FlatRecord<ITeam> & Required<{
|
|
18
|
+
_id: Types.ObjectId;
|
|
19
|
+
}> & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}>;
|
package/dist/models/Team.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TeamSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const Modality_1 = require("../types/Modality");
|
|
6
|
-
|
|
6
|
+
exports.TeamSchema = new mongoose_1.Schema({
|
|
7
7
|
name: { type: String, required: true },
|
|
8
8
|
shortName: { type: String, required: false },
|
|
9
9
|
logoUrl: { type: String, required: false },
|
|
@@ -15,6 +15,5 @@ const TeamSchema = new mongoose_1.Schema({
|
|
|
15
15
|
updatedAt: "updatedAtDateTime"
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
TeamSchema.index({ name: 1, modality: 1 }, { unique: true });
|
|
19
|
-
TeamSchema.index({ externalId: 1 }, { unique: true, sparse: true });
|
|
20
|
-
exports.TeamModel = (0, mongoose_1.model)("team", TeamSchema);
|
|
18
|
+
exports.TeamSchema.index({ name: 1, modality: 1 }, { unique: true });
|
|
19
|
+
exports.TeamSchema.index({ externalId: 1 }, { unique: true, sparse: true });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export * from "./Challenge";
|
|
2
|
+
export * from "./ChallengeRound";
|
|
3
|
+
export * from "./Championship";
|
|
4
|
+
export * from "./ChampionshipMatch";
|
|
5
|
+
export * from "./ChampionshipPhase";
|
|
6
|
+
export * from "./ChampionshipRound";
|
|
7
|
+
export * from "./Team";
|
package/dist/models/index.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var ChampionshipPhase_1 = require("./ChampionshipPhase");
|
|
11
|
-
Object.defineProperty(exports, "ChampionshipPhaseModel", { enumerable: true, get: function () { return ChampionshipPhase_1.ChampionshipPhaseModel; } });
|
|
12
|
-
var ChampionshipRound_1 = require("./ChampionshipRound");
|
|
13
|
-
Object.defineProperty(exports, "ChampionshipRoundModel", { enumerable: true, get: function () { return ChampionshipRound_1.ChampionshipRoundModel; } });
|
|
14
|
-
var ChampionshipMatch_1 = require("./ChampionshipMatch");
|
|
15
|
-
Object.defineProperty(exports, "MatchModel", { enumerable: true, get: function () { return ChampionshipMatch_1.MatchModel; } });
|
|
16
|
-
var Team_1 = require("./Team");
|
|
17
|
-
Object.defineProperty(exports, "TeamModel", { enumerable: true, get: function () { return Team_1.TeamModel; } });
|
|
17
|
+
__exportStar(require("./Challenge"), exports);
|
|
18
|
+
__exportStar(require("./ChallengeRound"), exports);
|
|
19
|
+
__exportStar(require("./Championship"), exports);
|
|
20
|
+
__exportStar(require("./ChampionshipMatch"), exports);
|
|
21
|
+
__exportStar(require("./ChampionshipPhase"), exports);
|
|
22
|
+
__exportStar(require("./ChampionshipRound"), exports);
|
|
23
|
+
__exportStar(require("./Team"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c2-climbing-x",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Modelagem TypeScript/Mongoose para o jogo Escalada X (times, campeonatos, fases, rodadas, confrontos, desafios)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "^20.12.11",
|
|
20
|
-
"mongoose": "
|
|
20
|
+
"mongoose": "8.16.1",
|
|
21
21
|
"typescript": "^5.4.5"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|