wip mango

This commit is contained in:
salam committed 2026-03-23 06:58:36 +01:00
1 parent df60d37f3a
commit ad7925bbba
19 files changed
+19040 -138

No files matched your search

+65 -56
View File
@@ -1,75 +1,84 @@
<?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 = 'up_events';
protected $fillable = [
'name',
'gravitational_force',
'diameter',
'moons',
'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 [
'date_time_ss' => 'datetime',
'starttime' => 'datetime',
'date_acquisition' => 'datetime',
];
}
}
/***
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
*/
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');
}
public function player(): BelongsTo
{
return $this->belongsTo(Player::class, 'player_id', 'id');
}
}