c2-climbing-x 1.0.48 → 1.0.50

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,12 @@ export interface IPhaseParticipant {
9
9
  }
10
10
  export interface IGroup {
11
11
  name: string;
12
- slots: IQualifiedsSlots[];
12
+ slots: ISlots[];
13
+ }
14
+ export interface ISlots {
15
+ _id: Types.ObjectId;
16
+ label: string;
17
+ team: Types.ObjectId | ITeam;
13
18
  }
14
19
  export interface IChampionshipPhase {
15
20
  _id: Types.ObjectId;
@@ -24,13 +29,10 @@ export interface IChampionshipPhase {
24
29
  createdAtDateTime: Date;
25
30
  updatedAtDateTime: Date;
26
31
  }
27
- export interface IQualifiedsSlots {
28
- _id: Types.ObjectId;
29
- label: string;
30
- team: Types.ObjectId | ITeam;
31
- group: string;
32
- position: number;
32
+ export interface IQualifiedsSlots extends ISlots {
33
33
  priority: number;
34
+ position: number;
35
+ group?: string;
34
36
  }
35
37
  export interface IMatchRules {
36
38
  mode: GroupMatchMode;
@@ -43,6 +45,15 @@ export interface IQualifiedRule {
43
45
  limit: number;
44
46
  label: string;
45
47
  }
48
+ export declare const SlotsSchema: Schema<ISlots, import("mongoose").Model<ISlots, any, any, any, import("mongoose").Document<unknown, any, ISlots, any> & ISlots & Required<{
49
+ _id: Types.ObjectId;
50
+ }> & {
51
+ __v: number;
52
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ISlots, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ISlots>, {}> & import("mongoose").FlatRecord<ISlots> & Required<{
53
+ _id: Types.ObjectId;
54
+ }> & {
55
+ __v: number;
56
+ }>;
46
57
  export declare const QualifiedsSlotsSchema: Schema<IQualifiedsSlots, import("mongoose").Model<IQualifiedsSlots, any, any, any, import("mongoose").Document<unknown, any, IQualifiedsSlots, any> & IQualifiedsSlots & Required<{
47
58
  _id: Types.ObjectId;
48
59
  }> & {
@@ -1,20 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChampionshipPhaseSchema = exports.MatchRulesSchema = exports.QualifiedRuleSchema = exports.GroupSchema = exports.QualifiedsSlotsSchema = void 0;
3
+ exports.ChampionshipPhaseSchema = exports.MatchRulesSchema = exports.QualifiedRuleSchema = exports.GroupSchema = exports.QualifiedsSlotsSchema = exports.SlotsSchema = 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.SlotsSchema = new mongoose_1.Schema({
8
+ _id: { type: mongoose_1.Schema.Types.ObjectId, default: () => new mongoose_1.Types.ObjectId() },
9
+ label: { type: String, required: true },
10
+ team: { type: mongoose_1.Schema.Types.ObjectId, ref: "team" },
11
+ });
7
12
  exports.QualifiedsSlotsSchema = new mongoose_1.Schema({
8
13
  _id: { type: mongoose_1.Schema.Types.ObjectId, default: () => new mongoose_1.Types.ObjectId() },
9
14
  label: { type: String, required: true },
10
15
  team: { type: mongoose_1.Schema.Types.ObjectId, ref: "team" },
11
- group: { type: String, required: true },
16
+ priority: { type: Number, required: true },
12
17
  position: { type: Number, required: true },
13
- priority: { type: Number, required: true }
18
+ group: { type: String, required: false, default: "" }
14
19
  });
15
20
  exports.GroupSchema = new mongoose_1.Schema({
16
21
  name: { type: String, required: true },
17
- slots: { type: [exports.QualifiedsSlotsSchema], required: true, default: [] },
22
+ slots: { type: [exports.SlotsSchema], required: true, default: [] },
18
23
  }, { _id: false });
19
24
  exports.QualifiedRuleSchema = new mongoose_1.Schema({
20
25
  priority: { type: Number, required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-climbing-x",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
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",