statistiko events
This commit is contained in:
1 parent
c1b5adb3a4
commit
3d9239737f
29 files changed
+466
-767
No files matched your search
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class StatistikoEvent extends Model
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
protected $table = 'events';
|
||||
|
||||
protected $fillable = [
|
||||
'sport_id',
|
||||
'league_id',
|
||||
'home_id',
|
||||
'away_id',
|
||||
'starttime',
|
||||
'season',
|
||||
'gls_h',
|
||||
'gls_a',
|
||||
'crn_h',
|
||||
'fls_h',
|
||||
'ofs_h',
|
||||
'snt_h',
|
||||
'tsh_h',
|
||||
'crd_h',
|
||||
'crn_a',
|
||||
'fls_a',
|
||||
'ofs_a',
|
||||
'snt_a',
|
||||
'tsh_a',
|
||||
'crd_a',
|
||||
'expgoalshome_value',
|
||||
'expgoalsaway_value',
|
||||
'exp_handicap',
|
||||
'exp_total',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'starttime' => 'date',
|
||||
];
|
||||
}
|
||||
|
||||
public function league(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CompetitionGroup::class, 'league_id', 'id');
|
||||
}
|
||||
|
||||
public function home(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'home_id', 'id');
|
||||
}
|
||||
|
||||
public function away(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'away_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ namespace App\Models;
|
||||
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class UbPlayer extends Model
|
||||
class StatistikoPlayer extends Model
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
@@ -33,21 +33,8 @@ class UbPlayer extends Model
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'id_giocatore' => 'string',
|
||||
'national_team_id' => 'string',
|
||||
'altezza' => 'integer',
|
||||
'sport_radar_id' => 'string',
|
||||
'id_squadra_tm' => 'string',
|
||||
'data_di_nascita' => 'date',
|
||||
'giocatore' => 'string',
|
||||
'nazionalita' => 'string',
|
||||
'posizione' => 'string',
|
||||
'nome_completo' => 'string',
|
||||
'rigorista' => 'string',
|
||||
'data_aggiornamento' => 'string',
|
||||
'league_code' => 'string',
|
||||
'team_code' => 'string',
|
||||
'team_name' => 'string',
|
||||
'data_aggiornamento' => 'date',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class UbEvent extends Model
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
protected $table = 'events';
|
||||
|
||||
protected $fillable = [
|
||||
'league_id',
|
||||
'home_id',
|
||||
'away_id',
|
||||
'player_id',
|
||||
'starttime',
|
||||
'home_away',
|
||||
'home_ft',
|
||||
'away_ft',
|
||||
'home_ht',
|
||||
'away_ht',
|
||||
'goals',
|
||||
'assists',
|
||||
'tackles',
|
||||
'total_passes',
|
||||
'passes_done',
|
||||
'total_duels',
|
||||
'duels_won',
|
||||
'total_ground_duels',
|
||||
'ground_duels_won',
|
||||
'total_aerial_duels',
|
||||
'aerial_duels_won',
|
||||
'minutes_played',
|
||||
'shots_on_target',
|
||||
'shots_off_target',
|
||||
'shots_blocked',
|
||||
'total_dribble',
|
||||
'dribble_done',
|
||||
'position',
|
||||
'rating',
|
||||
'bcm',
|
||||
'hw',
|
||||
'pw',
|
||||
'pm',
|
||||
'possession_lost',
|
||||
'fouls',
|
||||
'was_fouled',
|
||||
'offsides',
|
||||
'date_acquisition',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'league_id' => 'integer',
|
||||
'home_id' => 'integer',
|
||||
'away_id' => 'integer',
|
||||
'player_id' => 'integer',
|
||||
'starttime' => 'date',
|
||||
'date_acquisition' => 'date',
|
||||
'rating' => 'string',
|
||||
'home_away' => 'string',
|
||||
'home_ft' => 'integer',
|
||||
'away_ft' => 'integer',
|
||||
'home_ht' => 'integer',
|
||||
'away_ht' => 'integer',
|
||||
'goals' => 'integer',
|
||||
'assists' => 'integer',
|
||||
'tackles' => 'integer',
|
||||
'total_passes' => 'integer',
|
||||
'passes_done' => 'integer',
|
||||
'total_duels' => 'integer',
|
||||
'duels_won' => 'integer',
|
||||
'total_ground_duels' => 'integer',
|
||||
'ground_duels_won' => 'integer',
|
||||
'total_aerial_duels' => 'integer',
|
||||
'aerial_duels_won' => 'integer',
|
||||
'minutes_played' => 'integer',
|
||||
'shots_on_target' => 'integer',
|
||||
'shots_off_target' => 'integer',
|
||||
'shots_blocked' => 'integer',
|
||||
'total_dribble' => 'integer',
|
||||
'dribble_done' => 'integer',
|
||||
'position' => 'integer',
|
||||
'bcm' => 'integer',
|
||||
'hw' => 'integer',
|
||||
'pw' => 'integer',
|
||||
'pm' => 'integer',
|
||||
'possession_lost' => 'integer',
|
||||
'fouls' => 'integer',
|
||||
'was_fouled' => 'integer',
|
||||
'offsides' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function league(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CompetitionGroup::class, 'league_id', 'id');
|
||||
}
|
||||
|
||||
public function home(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'home_id', 'id');
|
||||
}
|
||||
|
||||
public function away(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'away_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
country_ss
|
||||
league_ss
|
||||
home
|
||||
away
|
||||
home_ft
|
||||
away_ft
|
||||
home_ht
|
||||
away_ht
|
||||
date_time_ss
|
||||
team
|
||||
player_ss
|
||||
goals
|
||||
assists
|
||||
tackles
|
||||
total_passes
|
||||
passes_done
|
||||
total_duels
|
||||
duels_won
|
||||
total_ground_duels
|
||||
ground_duels_won
|
||||
total_aerial_duels
|
||||
aerial_duels_won
|
||||
minutes_played
|
||||
shots_on_target
|
||||
shots_off_target
|
||||
shots_blocked
|
||||
total_dribble
|
||||
dribble_done
|
||||
position
|
||||
rating
|
||||
bcm
|
||||
hw
|
||||
pw
|
||||
pm
|
||||
possession_
|
||||
lost
|
||||
fouls
|
||||
was_fouled
|
||||
offsides
|
||||
id_player_tm
|
||||
h_a
|
||||
date_player_id
|
||||
date_home_away
|
||||
id_league
|
||||
data_di_acquisizione
|
||||
txleague_id
|
||||
txhome_id
|
||||
txaway_id
|
||||
Reference in new issue
Block a user