c2-climbing-x 1.0.35 → 1.0.37

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.
@@ -3,12 +3,7 @@ import { IChallenge } from "./Challenge";
3
3
  import { IChampionshipMatch } from "./ChampionshipMatch";
4
4
  import { IChampionshipRound } from "./ChampionshipRound";
5
5
  import { ITeam } from "./Team";
6
- export declare enum ChallengeRoundStatus {
7
- NOT_PLAYED = "NOT_PLAYED",
8
- SCHEDULED = "SCHEDULED",
9
- IN_PROGRESS = "IN_PROGRESS",
10
- FINISHED = "FINISHED"
11
- }
6
+ import { RoundStatus } from "../types/RoundStatus";
12
7
  export interface IChallengeMatch {
13
8
  match: Types.ObjectId | IChampionshipMatch;
14
9
  enabled: boolean;
@@ -21,7 +16,7 @@ export interface IChallengeRound {
21
16
  round: Types.ObjectId | IChampionshipRound;
22
17
  matches?: IChallengeMatch[];
23
18
  enabled: boolean;
24
- status: ChallengeRoundStatus;
19
+ status: RoundStatus;
25
20
  sequenceOrder?: number;
26
21
  createdAtDateTime: Date;
27
22
  updatedAtDateTime: Date;
@@ -1,14 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChallengeRoundSchema = exports.ChallengeMatchSchema = exports.ChallengeRoundStatus = void 0;
3
+ exports.ChallengeRoundSchema = exports.ChallengeMatchSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- var ChallengeRoundStatus;
6
- (function (ChallengeRoundStatus) {
7
- ChallengeRoundStatus["NOT_PLAYED"] = "NOT_PLAYED";
8
- ChallengeRoundStatus["SCHEDULED"] = "SCHEDULED";
9
- ChallengeRoundStatus["IN_PROGRESS"] = "IN_PROGRESS";
10
- ChallengeRoundStatus["FINISHED"] = "FINISHED";
11
- })(ChallengeRoundStatus || (exports.ChallengeRoundStatus = ChallengeRoundStatus = {}));
5
+ const RoundStatus_1 = require("../types/RoundStatus");
12
6
  exports.ChallengeMatchSchema = new mongoose_1.Schema({
13
7
  match: { type: mongoose_1.Schema.Types.ObjectId, ref: "match", required: true },
14
8
  enabled: { type: Boolean, required: true, default: true },
@@ -20,7 +14,7 @@ exports.ChallengeRoundSchema = new mongoose_1.Schema({
20
14
  round: { type: mongoose_1.Schema.Types.ObjectId, ref: "championship-round", required: true },
21
15
  matches: [{ type: exports.ChallengeMatchSchema }],
22
16
  enabled: { type: Boolean, required: true, default: true },
23
- status: { type: String, required: true, enum: ChallengeRoundStatus, default: ChallengeRoundStatus.SCHEDULED },
17
+ status: { type: String, required: true, enum: RoundStatus_1.RoundStatus, default: RoundStatus_1.RoundStatus.SCHEDULED },
24
18
  sequenceOrder: { type: Number, required: false }
25
19
  }, {
26
20
  timestamps: {
@@ -14,7 +14,9 @@ export interface IChampionshipMatch {
14
14
  slotAway: IQualifiedsSlots;
15
15
  scheduledAt?: Date;
16
16
  homeScore?: number;
17
+ homeScoreTieBreak?: number;
17
18
  awayScore?: number;
19
+ awayScoreTieBreak?: number;
18
20
  status: MatchStatus;
19
21
  createdAtDateTime: Date;
20
22
  updatedAtDateTime: Date;
@@ -14,7 +14,9 @@ exports.ChampionshipMatchSchema = new mongoose_1.Schema({
14
14
  slotAway: { type: ChampionshipPhase_1.QualifiedsSlotsSchema, required: true },
15
15
  scheduledAt: { type: Date, required: false },
16
16
  homeScore: { type: Number, required: false },
17
+ homeScoreTieBreak: { type: Number, required: false },
17
18
  awayScore: { type: Number, required: false },
19
+ awayScoreTieBreak: { type: Number, required: false },
18
20
  status: {
19
21
  type: String,
20
22
  required: true,
@@ -3,7 +3,8 @@
3
3
  * CLOSED = rodada encerrada; Desafio não pode usar como rodada mínima uma rodada já CLOSED.
4
4
  */
5
5
  export declare enum RoundStatus {
6
- PENDING = "PENDING",
7
- OPEN = "OPEN",
8
- CLOSED = "CLOSED"
6
+ NOT_PLAYED = "NOT_PLAYED",
7
+ SCHEDULED = "SCHEDULED",
8
+ IN_PROGRESS = "IN_PROGRESS",
9
+ FINISHED = "FINISHED"
9
10
  }
@@ -7,7 +7,8 @@ exports.RoundStatus = void 0;
7
7
  */
8
8
  var RoundStatus;
9
9
  (function (RoundStatus) {
10
- RoundStatus["PENDING"] = "PENDING";
11
- RoundStatus["OPEN"] = "OPEN";
12
- RoundStatus["CLOSED"] = "CLOSED";
10
+ RoundStatus["NOT_PLAYED"] = "NOT_PLAYED";
11
+ RoundStatus["SCHEDULED"] = "SCHEDULED";
12
+ RoundStatus["IN_PROGRESS"] = "IN_PROGRESS";
13
+ RoundStatus["FINISHED"] = "FINISHED";
13
14
  })(RoundStatus || (exports.RoundStatus = RoundStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-climbing-x",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
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",