wip details
This commit is contained in:
1 parent
62c3f80256
commit
8c372e38ef
12 files changed
+60
-55
No files matched your search
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class StatistikoDetail extends Model
|
||||
@@ -14,10 +15,11 @@ class StatistikoDetail extends Model
|
||||
|
||||
protected $fillable = [
|
||||
'ss_player_id',
|
||||
'ss_team_id',
|
||||
'tx_team_id',
|
||||
'player_name',
|
||||
'ss_national_team_id',
|
||||
'team_name',
|
||||
'birthday',
|
||||
'birthdate',
|
||||
'height',
|
||||
'nationality',
|
||||
'position',
|
||||
@@ -27,20 +29,21 @@ class StatistikoDetail extends Model
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
protected $casts = [
|
||||
'last_update' => 'datetime',
|
||||
];
|
||||
|
||||
// public function season()
|
||||
// {
|
||||
// return $this->hasMany(SofaScorePlayerPerSeason::class, 'ss_player_id', 'ss_player_id');
|
||||
// }
|
||||
|
||||
public function team(): BelongsTo
|
||||
{
|
||||
return [
|
||||
'birthdate' => 'date',
|
||||
'last_update' => 'date',
|
||||
];
|
||||
return $this->belongsTo(SofaScoreRosa::class, 'ss_team_id', 'ss_team_id');
|
||||
}
|
||||
|
||||
public function season()
|
||||
{
|
||||
return $this->hasMany(SofaScorePlayerPerSeason::class, 'ss_player_id', 'ss_player_id');
|
||||
}
|
||||
|
||||
public function ss_code()
|
||||
public function positions(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SofaScorePlayerPosition::class, 'position', 'ss_code');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user