@mtgame/core 0.1.27 → 0.1.29
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.
- package/api/tournament-api.d.ts +1 -0
- package/bundles/mtgame-core.umd.js +35 -2
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +2 -2
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/tournament-api.js +4 -1
- package/esm2015/models/base-statistic.js +1 -1
- package/esm2015/models/basketball-statistic.js +4 -1
- package/esm2015/models/football-game-log.js +7 -2
- package/esm2015/models/football-statistic.js +4 -1
- package/esm2015/models/handball-statistic.js +4 -1
- package/esm2015/models/hockey-statistic.js +4 -1
- package/esm2015/models/league-player.js +15 -3
- package/esm2015/models/volleyball-statistic.js +4 -1
- package/esm5/api/tournament-api.js +4 -1
- package/esm5/models/base-statistic.js +1 -1
- package/esm5/models/basketball-statistic.js +4 -1
- package/esm5/models/football-game-log.js +7 -2
- package/esm5/models/football-statistic.js +4 -1
- package/esm5/models/handball-statistic.js +4 -1
- package/esm5/models/hockey-statistic.js +4 -1
- package/esm5/models/league-player.js +19 -3
- package/esm5/models/volleyball-statistic.js +4 -1
- package/fesm2015/mtgame-core.js +31 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +35 -2
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/base-statistic.d.ts +2 -0
- package/models/basketball-statistic.d.ts +2 -0
- package/models/football-statistic.d.ts +2 -0
- package/models/handball-statistic.d.ts +2 -0
- package/models/hockey-statistic.d.ts +2 -0
- package/models/league-player.d.ts +4 -0
- package/models/volleyball-statistic.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/tournament-api.d.ts
CHANGED
|
@@ -2541,6 +2541,17 @@
|
|
|
2541
2541
|
enumerable: true,
|
|
2542
2542
|
configurable: true
|
|
2543
2543
|
});
|
|
2544
|
+
Object.defineProperty(LeaguePlayer.prototype, "age", {
|
|
2545
|
+
get: function () {
|
|
2546
|
+
if (!this.birthDate) {
|
|
2547
|
+
return null;
|
|
2548
|
+
}
|
|
2549
|
+
var diff = (new Date()).getTime() - this.birthDate.getTime();
|
|
2550
|
+
return Math.floor(diff / (365 * 86400 * 1000));
|
|
2551
|
+
},
|
|
2552
|
+
enumerable: true,
|
|
2553
|
+
configurable: true
|
|
2554
|
+
});
|
|
2544
2555
|
LeaguePlayer.toFront = function (data) {
|
|
2545
2556
|
};
|
|
2546
2557
|
LeaguePlayer.toBack = function (data) {
|
|
@@ -2560,12 +2571,16 @@
|
|
|
2560
2571
|
first_name: 'firstName',
|
|
2561
2572
|
last_name: 'lastName',
|
|
2562
2573
|
middle_name: 'middleName',
|
|
2574
|
+
birth_date: 'birthDate',
|
|
2563
2575
|
photo: 'photo',
|
|
2576
|
+
user: 'user',
|
|
2564
2577
|
has_changes: 'hasChanges',
|
|
2565
|
-
rating: 'rating'
|
|
2578
|
+
rating: 'rating',
|
|
2566
2579
|
},
|
|
2567
2580
|
relation: {
|
|
2581
|
+
birthDate: DateField,
|
|
2568
2582
|
photo: File,
|
|
2583
|
+
user: User,
|
|
2569
2584
|
}
|
|
2570
2585
|
})
|
|
2571
2586
|
], LeaguePlayer);
|
|
@@ -2636,6 +2651,7 @@
|
|
|
2636
2651
|
BasketballStatistic = __decorate([
|
|
2637
2652
|
ModelInstance({
|
|
2638
2653
|
mappingFields: {
|
|
2654
|
+
league_player: 'leaguePlayer',
|
|
2639
2655
|
tournament_team_user: 'tournamentTeamUser',
|
|
2640
2656
|
team: 'team',
|
|
2641
2657
|
team_user: 'teamUser',
|
|
@@ -2673,6 +2689,7 @@
|
|
|
2673
2689
|
rank: 'rank',
|
|
2674
2690
|
},
|
|
2675
2691
|
relation: {
|
|
2692
|
+
leaguePlayer: LeaguePlayer,
|
|
2676
2693
|
tournamentTeamUser: TournamentTeamUser,
|
|
2677
2694
|
team: Team,
|
|
2678
2695
|
teamUser: TeamUser,
|
|
@@ -3536,6 +3553,7 @@
|
|
|
3536
3553
|
HockeyStatistic = __decorate([
|
|
3537
3554
|
ModelInstance({
|
|
3538
3555
|
mappingFields: {
|
|
3556
|
+
league_player: 'leaguePlayer',
|
|
3539
3557
|
tournament_team_user: 'tournamentTeamUser',
|
|
3540
3558
|
team: 'team',
|
|
3541
3559
|
team_user: 'teamUser',
|
|
@@ -3593,6 +3611,7 @@
|
|
|
3593
3611
|
rank: 'rank',
|
|
3594
3612
|
},
|
|
3595
3613
|
relation: {
|
|
3614
|
+
leaguePlayer: LeaguePlayer,
|
|
3596
3615
|
tournamentTeamUser: TournamentTeamUser,
|
|
3597
3616
|
team: Team,
|
|
3598
3617
|
teamUser: TeamUser,
|
|
@@ -3755,7 +3774,12 @@
|
|
|
3755
3774
|
configurable: true
|
|
3756
3775
|
});
|
|
3757
3776
|
FootballGameLog.prototype.isScoreType = function () {
|
|
3758
|
-
return [
|
|
3777
|
+
return [
|
|
3778
|
+
exports.FootballGameLogTypes.goal,
|
|
3779
|
+
exports.FootballGameLogTypes.penalty_goal,
|
|
3780
|
+
exports.FootballGameLogTypes.small_penalty_goal,
|
|
3781
|
+
exports.FootballGameLogTypes.auto_goal,
|
|
3782
|
+
].indexOf(this.logType) > -1;
|
|
3759
3783
|
};
|
|
3760
3784
|
FootballGameLog.prototype.isAfter = function (log) {
|
|
3761
3785
|
if (this.time === log.time && this.period === log.period) {
|
|
@@ -4034,6 +4058,7 @@
|
|
|
4034
4058
|
FootballStatistic = __decorate([
|
|
4035
4059
|
ModelInstance({
|
|
4036
4060
|
mappingFields: {
|
|
4061
|
+
league_player: 'leaguePlayer',
|
|
4037
4062
|
tournament_team_user: 'tournamentTeamUser',
|
|
4038
4063
|
team: 'team',
|
|
4039
4064
|
team_user: 'teamUser',
|
|
@@ -4092,6 +4117,7 @@
|
|
|
4092
4117
|
auto_goals_against: 'autoGoalsAgainst',
|
|
4093
4118
|
},
|
|
4094
4119
|
relation: {
|
|
4120
|
+
leaguePlayer: LeaguePlayer,
|
|
4095
4121
|
tournamentTeamUser: TournamentTeamUser,
|
|
4096
4122
|
team: Team,
|
|
4097
4123
|
teamUser: TeamUser,
|
|
@@ -4482,6 +4508,7 @@
|
|
|
4482
4508
|
HandballStatistic = __decorate([
|
|
4483
4509
|
ModelInstance({
|
|
4484
4510
|
mappingFields: {
|
|
4511
|
+
league_player: 'leaguePlayer',
|
|
4485
4512
|
tournament_team_user: 'tournamentTeamUser',
|
|
4486
4513
|
team: 'team',
|
|
4487
4514
|
team_user: 'teamUser',
|
|
@@ -4529,6 +4556,7 @@
|
|
|
4529
4556
|
rank: 'rank',
|
|
4530
4557
|
},
|
|
4531
4558
|
relation: {
|
|
4559
|
+
leaguePlayer: LeaguePlayer,
|
|
4532
4560
|
tournamentTeamUser: TournamentTeamUser,
|
|
4533
4561
|
team: Team,
|
|
4534
4562
|
teamUser: TeamUser,
|
|
@@ -4777,6 +4805,7 @@
|
|
|
4777
4805
|
mappingFields: {
|
|
4778
4806
|
team: 'team',
|
|
4779
4807
|
team_user: 'teamUser',
|
|
4808
|
+
league_player: 'leaguePlayer',
|
|
4780
4809
|
tournament_team_user: 'tournamentTeamUser',
|
|
4781
4810
|
tournament_team: 'tournamentTeam',
|
|
4782
4811
|
user: 'user',
|
|
@@ -4813,6 +4842,7 @@
|
|
|
4813
4842
|
relation: {
|
|
4814
4843
|
team: Team,
|
|
4815
4844
|
teamUser: TeamUser,
|
|
4845
|
+
leaguePlayer: LeaguePlayer,
|
|
4816
4846
|
tournamentTeamUser: TournamentTeamUser,
|
|
4817
4847
|
tournamentTeam: TournamentTeam,
|
|
4818
4848
|
user: User,
|
|
@@ -5437,6 +5467,9 @@
|
|
|
5437
5467
|
if (filters.tournamentCourtId) {
|
|
5438
5468
|
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
5439
5469
|
}
|
|
5470
|
+
if (filters.leaguePlayerId) {
|
|
5471
|
+
params = params.set('league_player_id', filters.leaguePlayerId.toString());
|
|
5472
|
+
}
|
|
5440
5473
|
if (filters.userId) {
|
|
5441
5474
|
params = params.set('user_id', filters.userId.toString());
|
|
5442
5475
|
}
|