44 lines
828 B
PHP
44 lines
828 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 = [
|
|
'ss_player_id',
|
|
'player_name',
|
|
'tx_team_id',
|
|
'ss_national_team_id',
|
|
'team_name',
|
|
'birthday',
|
|
'height',
|
|
'nationality',
|
|
'position',
|
|
'preferred_foot',
|
|
'last_update',
|
|
'created_at',
|
|
'updated_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'birthdate' => 'date',
|
|
'last_update' => 'date',
|
|
];
|
|
}
|
|
|
|
public function season()
|
|
{
|
|
return $this->hasMany(SofaScorePlayerPerSeason::class, 'ss_player_id', 'ss_player_id');
|
|
}
|
|
}
|