c2-climbing-x 1.0.9 → 1.0.13
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.
|
@@ -9,7 +9,7 @@ export interface IPhaseParticipant {
|
|
|
9
9
|
}
|
|
10
10
|
export interface IGroup {
|
|
11
11
|
name: string;
|
|
12
|
-
|
|
12
|
+
slots: IQualifiedsSlots[];
|
|
13
13
|
}
|
|
14
14
|
export interface IChampionshipPhase {
|
|
15
15
|
_id: Types.ObjectId;
|
|
@@ -17,13 +17,14 @@ export interface IChampionshipPhase {
|
|
|
17
17
|
championship: Types.ObjectId | IChampionship;
|
|
18
18
|
order: number;
|
|
19
19
|
matchRules?: IMatchRules;
|
|
20
|
+
amountSlotsByGroup: number;
|
|
20
21
|
groups: IGroup[];
|
|
21
22
|
qualifiedRules: IQualifiedRule[];
|
|
22
|
-
|
|
23
|
+
qualifiedsSlots: IQualifiedsSlots[];
|
|
23
24
|
createdAtDateTime: Date;
|
|
24
25
|
updatedAtDateTime: Date;
|
|
25
26
|
}
|
|
26
|
-
export interface
|
|
27
|
+
export interface IQualifiedsSlots {
|
|
27
28
|
label: string;
|
|
28
29
|
teams: Types.ObjectId | ITeam;
|
|
29
30
|
}
|
|
@@ -38,38 +39,38 @@ export interface IQualifiedRule {
|
|
|
38
39
|
limit: number;
|
|
39
40
|
label: string;
|
|
40
41
|
}
|
|
41
|
-
export declare const
|
|
42
|
+
export declare const QualifiedsSlotsSchema: Schema<IQualifiedsSlots, import("mongoose").Model<IQualifiedsSlots, any, any, any, import("mongoose").Document<unknown, any, IQualifiedsSlots, any> & IQualifiedsSlots & {
|
|
42
43
|
_id: Types.ObjectId;
|
|
43
44
|
} & {
|
|
44
45
|
__v: number;
|
|
45
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
46
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IQualifiedsSlots, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IQualifiedsSlots>, {}> & import("mongoose").FlatRecord<IQualifiedsSlots> & {
|
|
46
47
|
_id: Types.ObjectId;
|
|
47
48
|
} & {
|
|
48
49
|
__v: number;
|
|
49
50
|
}>;
|
|
50
|
-
export declare const
|
|
51
|
+
export declare const GroupSchema: Schema<IGroup, import("mongoose").Model<IGroup, any, any, any, import("mongoose").Document<unknown, any, IGroup, any> & IGroup & {
|
|
51
52
|
_id: Types.ObjectId;
|
|
52
53
|
} & {
|
|
53
54
|
__v: number;
|
|
54
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
55
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IGroup, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IGroup>, {}> & import("mongoose").FlatRecord<IGroup> & {
|
|
55
56
|
_id: Types.ObjectId;
|
|
56
57
|
} & {
|
|
57
58
|
__v: number;
|
|
58
59
|
}>;
|
|
59
|
-
export declare const
|
|
60
|
+
export declare const QualifiedRuleSchema: Schema<IQualifiedRule, import("mongoose").Model<IQualifiedRule, any, any, any, import("mongoose").Document<unknown, any, IQualifiedRule, any> & IQualifiedRule & {
|
|
60
61
|
_id: Types.ObjectId;
|
|
61
62
|
} & {
|
|
62
63
|
__v: number;
|
|
63
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
64
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IQualifiedRule, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IQualifiedRule>, {}> & import("mongoose").FlatRecord<IQualifiedRule> & {
|
|
64
65
|
_id: Types.ObjectId;
|
|
65
66
|
} & {
|
|
66
67
|
__v: number;
|
|
67
68
|
}>;
|
|
68
|
-
export declare const
|
|
69
|
+
export declare const MatchRulesSchema: Schema<IMatchRules, import("mongoose").Model<IMatchRules, any, any, any, import("mongoose").Document<unknown, any, IMatchRules, any> & IMatchRules & {
|
|
69
70
|
_id: Types.ObjectId;
|
|
70
71
|
} & {
|
|
71
72
|
__v: number;
|
|
72
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
73
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IMatchRules, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IMatchRules>, {}> & import("mongoose").FlatRecord<IMatchRules> & {
|
|
73
74
|
_id: Types.ObjectId;
|
|
74
75
|
} & {
|
|
75
76
|
__v: number;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChampionshipPhaseSchema = exports.
|
|
3
|
+
exports.ChampionshipPhaseSchema = exports.MatchRulesSchema = exports.QualifiedRuleSchema = exports.GroupSchema = exports.QualifiedsSlotsSchema = 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
|
+
exports.QualifiedsSlotsSchema = new mongoose_1.Schema({
|
|
8
|
+
label: { type: String, required: true },
|
|
9
|
+
teams: { type: [mongoose_1.Schema.Types.ObjectId], ref: "team", required: true, default: [] },
|
|
10
|
+
}, { _id: false });
|
|
7
11
|
exports.GroupSchema = new mongoose_1.Schema({
|
|
8
12
|
name: { type: String, required: true },
|
|
9
|
-
|
|
13
|
+
slots: { type: [exports.QualifiedsSlotsSchema], required: true, default: [] },
|
|
10
14
|
}, { _id: false });
|
|
11
15
|
exports.QualifiedRuleSchema = new mongoose_1.Schema({
|
|
12
16
|
priority: { type: Number, required: true },
|
|
13
17
|
mode: { type: String, required: true, enum: QualificationMode_1.QualificationMode },
|
|
14
18
|
position: { type: Number, required: true },
|
|
15
19
|
limit: { type: Number, required: true },
|
|
16
|
-
label: { type: String,
|
|
20
|
+
label: { type: String, default: "" },
|
|
17
21
|
});
|
|
18
22
|
exports.MatchRulesSchema = new mongoose_1.Schema({
|
|
19
23
|
mode: { type: String, required: true, enum: GroupMatchMode_1.GroupMatchMode },
|
|
20
24
|
twoLegs: { type: Boolean, required: true, default: false },
|
|
21
25
|
});
|
|
22
|
-
exports.QualifiedsTeamsSchema = new mongoose_1.Schema({
|
|
23
|
-
label: { type: String, required: true },
|
|
24
|
-
teams: { type: [mongoose_1.Schema.Types.ObjectId], ref: "team", required: true, default: [] },
|
|
25
|
-
}, { _id: false });
|
|
26
26
|
exports.ChampionshipPhaseSchema = new mongoose_1.Schema({
|
|
27
27
|
description: { type: String, required: true },
|
|
28
28
|
championship: {
|
|
@@ -31,10 +31,11 @@ exports.ChampionshipPhaseSchema = new mongoose_1.Schema({
|
|
|
31
31
|
required: true
|
|
32
32
|
},
|
|
33
33
|
order: { type: Number, required: true },
|
|
34
|
+
amountSlotsByGroup: { type: Number, required: true, default: 2 },
|
|
34
35
|
groups: { type: [exports.GroupSchema], required: true, default: [] },
|
|
35
36
|
matchRules: { type: exports.MatchRulesSchema, required: true },
|
|
36
37
|
qualifiedRules: { type: [exports.QualifiedRuleSchema], required: true },
|
|
37
|
-
|
|
38
|
+
qualifiedsSlots: { type: [exports.QualifiedsSlotsSchema], required: true, default: [] }
|
|
38
39
|
}, {
|
|
39
40
|
timestamps: {
|
|
40
41
|
createdAt: "createdAtDateTime",
|
package/package.json
CHANGED