@mtgame/core 0.2.49 → 0.2.51

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.
@@ -773,8 +773,8 @@
773
773
  SportTypes[SportTypes["handball"] = 13] = "handball";
774
774
  SportTypes[SportTypes["handball_classic"] = 14] = "handball_classic";
775
775
  SportTypes[SportTypes["rugby"] = 15] = "rugby";
776
- SportTypes[SportTypes["rugby7"] = 16] = "rugby7";
777
- SportTypes[SportTypes["rugby15"] = 17] = "rugby15";
776
+ SportTypes[SportTypes["rugby15"] = 16] = "rugby15";
777
+ SportTypes[SportTypes["rugby7"] = 17] = "rugby7";
778
778
  SportTypes[SportTypes["basketball_1x1"] = 18] = "basketball_1x1";
779
779
  SportTypes[SportTypes["waterpolo"] = 19] = "waterpolo";
780
780
  SportTypes[SportTypes["classic_waterpolo"] = 20] = "classic_waterpolo";
@@ -6445,11 +6445,57 @@
6445
6445
  })
6446
6446
  ], exports.VolleyballStatistic);
6447
6447
 
6448
+ exports.StageTeamGame = /** @class */ (function (_super) {
6449
+ __extends(StageTeamGame, _super);
6450
+ function StageTeamGame() {
6451
+ return _super !== null && _super.apply(this, arguments) || this;
6452
+ }
6453
+ StageTeamGame.toFront = function (data) { };
6454
+ StageTeamGame.toBack = function (data) { };
6455
+ return StageTeamGame;
6456
+ }(BaseModel));
6457
+ __decorate([
6458
+ ToFrontHook
6459
+ ], exports.StageTeamGame, "toFront", null);
6460
+ __decorate([
6461
+ ToBackHook
6462
+ ], exports.StageTeamGame, "toBack", null);
6463
+ exports.StageTeamGame = __decorate([
6464
+ ModelInstance({
6465
+ mappingFields: {
6466
+ id: 'id',
6467
+ team_id: 'teamId',
6468
+ competitor_team_id: 'competitorTeamId',
6469
+ team_score: 'teamScore',
6470
+ competitor_team_score: 'competitorTeamScore',
6471
+ }
6472
+ })
6473
+ ], exports.StageTeamGame);
6448
6474
  exports.TournamentStageTeam = /** @class */ (function (_super) {
6449
6475
  __extends(TournamentStageTeam, _super);
6450
6476
  function TournamentStageTeam() {
6451
- return _super !== null && _super.apply(this, arguments) || this;
6477
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
6478
+ _this.gamesMapping = {};
6479
+ return _this;
6452
6480
  }
6481
+ Object.defineProperty(TournamentStageTeam.prototype, "games", {
6482
+ get: function () {
6483
+ return this._games;
6484
+ },
6485
+ set: function (value) {
6486
+ var _this = this;
6487
+ this._games = value;
6488
+ this.gamesMapping = value.reduce(function (acc, game) {
6489
+ var _a;
6490
+ var competitorTeamId = game.teamId === _this.tournamentTeam.team.id ? game.competitorTeamId : game.teamId;
6491
+ return Object.assign(Object.assign({}, acc), (_a = {}, _a[competitorTeamId] = __spreadArray(__spreadArray([], __read((acc[competitorTeamId] || []))), [
6492
+ game,
6493
+ ]), _a));
6494
+ }, {});
6495
+ },
6496
+ enumerable: false,
6497
+ configurable: true
6498
+ });
6453
6499
  Object.defineProperty(TournamentStageTeam.prototype, "gamesWonPercent", {
6454
6500
  get: function () {
6455
6501
  if (!this.gamesCount) {
@@ -6488,10 +6534,17 @@
6488
6534
  final_standing: 'finalStanding',
6489
6535
  received_points: 'receivedPoints',
6490
6536
  received_mt_points: 'receivedMtPoints',
6537
+ tries_scored: 'triesScored',
6538
+ tries_missed: 'triesMissed',
6539
+ attack_bonuses: 'attackBonuses',
6540
+ defense_bonuses: 'defenseBonuses',
6541
+ games: 'games',
6542
+ draw_games_count: 'drawGamesCount',
6491
6543
  },
6492
6544
  relation: {
6493
6545
  tournamentTeam: exports.TournamentTeam,
6494
- group: exports.TournamentGroup
6546
+ group: exports.TournamentGroup,
6547
+ games: listField(exports.StageTeamGame),
6495
6548
  }
6496
6549
  })
6497
6550
  ], exports.TournamentStageTeam);