wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class StatistikoDetail extends Model
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
protected $table = 'details';
|
||||
|
||||
protected $fillable = [
|
||||
'ss_player_id',
|
||||
'ss_team_id',
|
||||
'player_name',
|
||||
'ss_national_team_id',
|
||||
'birthdate',
|
||||
'height',
|
||||
'nationality',
|
||||
'position',
|
||||
'preferred_foot',
|
||||
'last_update',
|
||||
'last_import',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'last_update' => 'datetime',
|
||||
];
|
||||
|
||||
// public function season()
|
||||
// {
|
||||
// return $this->hasMany(SofaScorePlayerPerSeason::class, 'ss_player_id', 'ss_player_id');
|
||||
// }
|
||||
|
||||
public function team(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SofaScoreRosa::class, 'ss_team_id', 'ss_team_id');
|
||||
}
|
||||
|
||||
public function positions(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SofaScorePlayerPosition::class, 'position', 'ss_code');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user