c2-climbing-x 1.0.4 → 1.0.5

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.
@@ -6,18 +6,18 @@ import { ITeam } from "./Team";
6
6
  /** Time na fase, com identificador opcional de grupo (ex.: "A", "B" na fase de grupos). */
7
7
  export interface IPhaseParticipant {
8
8
  team: Types.ObjectId | ITeam;
9
- group?: string;
9
+ }
10
+ export interface IGroup {
11
+ name: string;
12
+ teams: Types.ObjectId[] | ITeam[];
10
13
  }
11
14
  export interface IChampionshipPhase {
12
15
  _id: Types.ObjectId;
13
16
  description: string;
14
17
  championship: Types.ObjectId | IChampionship;
15
18
  order: number;
16
- /** Times da fase; cada item pode ter um identificador de grupo (ex.: Copa do Mundo). */
17
- participants: IPhaseParticipant[];
18
- /** Modo de disputa dos grupos . */
19
19
  matchRules?: IMatchRules;
20
- /** Modos de classificação para a próxima fase (pode ser mais de um). */
20
+ groups: IGroup[];
21
21
  qualifiedRules: IQualifiedRule[];
22
22
  createdAtDateTime: Date;
23
23
  updatedAtDateTime: Date;
@@ -32,11 +32,11 @@ export interface IQualifiedRule {
32
32
  position: number;
33
33
  limit: number;
34
34
  }
35
- export declare const PhaseParticipantSchema: Schema<IPhaseParticipant, import("mongoose").Model<IPhaseParticipant, any, any, any, import("mongoose").Document<unknown, any, IPhaseParticipant, any> & IPhaseParticipant & {
35
+ export declare const GroupSchema: Schema<IGroup, import("mongoose").Model<IGroup, any, any, any, import("mongoose").Document<unknown, any, IGroup, any> & IGroup & {
36
36
  _id: Types.ObjectId;
37
37
  } & {
38
38
  __v: number;
39
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IPhaseParticipant, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IPhaseParticipant>, {}> & import("mongoose").FlatRecord<IPhaseParticipant> & {
39
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IGroup, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IGroup>, {}> & import("mongoose").FlatRecord<IGroup> & {
40
40
  _id: Types.ObjectId;
41
41
  } & {
42
42
  __v: number;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChampionshipPhaseSchema = exports.MatchRulesSchema = exports.QualifiedRuleSchema = exports.PhaseParticipantSchema = void 0;
3
+ exports.ChampionshipPhaseSchema = exports.MatchRulesSchema = exports.QualifiedRuleSchema = exports.GroupSchema = 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.PhaseParticipantSchema = new mongoose_1.Schema({
8
- team: { type: mongoose_1.Schema.Types.ObjectId, ref: "team", required: true },
9
- group: { type: String, required: false }
7
+ exports.GroupSchema = new mongoose_1.Schema({
8
+ name: { type: String, required: true },
9
+ teams: { type: [mongoose_1.Schema.Types.ObjectId], ref: "team", required: true, default: [] },
10
10
  }, { _id: false });
11
11
  exports.QualifiedRuleSchema = new mongoose_1.Schema({
12
12
  priority: { type: Number, required: true },
@@ -26,7 +26,7 @@ exports.ChampionshipPhaseSchema = new mongoose_1.Schema({
26
26
  required: true
27
27
  },
28
28
  order: { type: Number, required: true },
29
- participants: { type: [exports.PhaseParticipantSchema], required: true, default: [] },
29
+ groups: { type: [exports.GroupSchema], required: true, default: [] },
30
30
  matchRules: { type: exports.MatchRulesSchema, required: true },
31
31
  qualifiedRules: { type: [exports.QualifiedRuleSchema], required: true }
32
32
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-climbing-x",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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",