48 lines
907 B
PHP
48 lines
907 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use MongoDB\Laravel\Eloquent\Model;
|
|
|
|
class StatistikoDetail extends Model
|
|
{
|
|
protected $connection = 'mongodb';
|
|
|
|
protected $table = 'details';
|
|
|
|
protected $fillable = [
|
|
'tm_player_id',
|
|
'name',
|
|
'full_name',
|
|
'birthdate',
|
|
'height',
|
|
'nationality',
|
|
'position',
|
|
'sport_radar_id',
|
|
'id_squadra_tm',
|
|
'rigorist',
|
|
'national_team_id',
|
|
'last_update',
|
|
'league_code',
|
|
'team_code',
|
|
'team_name',
|
|
'created_at',
|
|
'updated_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'birthdate' => 'date',
|
|
'last_update' => 'date',
|
|
];
|
|
}
|
|
|
|
public function season()
|
|
{
|
|
return $this->hasMany(SofaScorePlayerPerSeason::class, 'tm_player_id', 'tm_player_id');
|
|
}
|
|
}
|