@mtgame/core 0.1.28 → 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 +29 -1
- 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-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-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 +25 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +29 -1
- 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,
|
|
@@ -4039,6 +4058,7 @@
|
|
|
4039
4058
|
FootballStatistic = __decorate([
|
|
4040
4059
|
ModelInstance({
|
|
4041
4060
|
mappingFields: {
|
|
4061
|
+
league_player: 'leaguePlayer',
|
|
4042
4062
|
tournament_team_user: 'tournamentTeamUser',
|
|
4043
4063
|
team: 'team',
|
|
4044
4064
|
team_user: 'teamUser',
|
|
@@ -4097,6 +4117,7 @@
|
|
|
4097
4117
|
auto_goals_against: 'autoGoalsAgainst',
|
|
4098
4118
|
},
|
|
4099
4119
|
relation: {
|
|
4120
|
+
leaguePlayer: LeaguePlayer,
|
|
4100
4121
|
tournamentTeamUser: TournamentTeamUser,
|
|
4101
4122
|
team: Team,
|
|
4102
4123
|
teamUser: TeamUser,
|
|
@@ -4487,6 +4508,7 @@
|
|
|
4487
4508
|
HandballStatistic = __decorate([
|
|
4488
4509
|
ModelInstance({
|
|
4489
4510
|
mappingFields: {
|
|
4511
|
+
league_player: 'leaguePlayer',
|
|
4490
4512
|
tournament_team_user: 'tournamentTeamUser',
|
|
4491
4513
|
team: 'team',
|
|
4492
4514
|
team_user: 'teamUser',
|
|
@@ -4534,6 +4556,7 @@
|
|
|
4534
4556
|
rank: 'rank',
|
|
4535
4557
|
},
|
|
4536
4558
|
relation: {
|
|
4559
|
+
leaguePlayer: LeaguePlayer,
|
|
4537
4560
|
tournamentTeamUser: TournamentTeamUser,
|
|
4538
4561
|
team: Team,
|
|
4539
4562
|
teamUser: TeamUser,
|
|
@@ -4782,6 +4805,7 @@
|
|
|
4782
4805
|
mappingFields: {
|
|
4783
4806
|
team: 'team',
|
|
4784
4807
|
team_user: 'teamUser',
|
|
4808
|
+
league_player: 'leaguePlayer',
|
|
4785
4809
|
tournament_team_user: 'tournamentTeamUser',
|
|
4786
4810
|
tournament_team: 'tournamentTeam',
|
|
4787
4811
|
user: 'user',
|
|
@@ -4818,6 +4842,7 @@
|
|
|
4818
4842
|
relation: {
|
|
4819
4843
|
team: Team,
|
|
4820
4844
|
teamUser: TeamUser,
|
|
4845
|
+
leaguePlayer: LeaguePlayer,
|
|
4821
4846
|
tournamentTeamUser: TournamentTeamUser,
|
|
4822
4847
|
tournamentTeam: TournamentTeam,
|
|
4823
4848
|
user: User,
|
|
@@ -5442,6 +5467,9 @@
|
|
|
5442
5467
|
if (filters.tournamentCourtId) {
|
|
5443
5468
|
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
5444
5469
|
}
|
|
5470
|
+
if (filters.leaguePlayerId) {
|
|
5471
|
+
params = params.set('league_player_id', filters.leaguePlayerId.toString());
|
|
5472
|
+
}
|
|
5445
5473
|
if (filters.userId) {
|
|
5446
5474
|
params = params.set('user_id', filters.userId.toString());
|
|
5447
5475
|
}
|