move all to ss IDs
This commit is contained in:
1 parent
09bf62c525
commit
df0a2a9de0
24 files changed
+527
-101
No files matched your search
@@ -3,9 +3,14 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use MongoDB\Laravel\Eloquent\HybridRelations;
|
||||
|
||||
class SofaScoreTournament extends Model
|
||||
{
|
||||
use HybridRelations;
|
||||
|
||||
protected $connection = 'mariadb';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'sport_id',
|
||||
|
||||
@@ -30,7 +30,7 @@ class StatisticFixtures extends Model
|
||||
|
||||
public function league()
|
||||
{
|
||||
return $this->belongsTo(CompetitionGroup::class);
|
||||
return $this->belongsTo(SofaScoreTournament::class, 'league_id', 'tournament_id');
|
||||
}
|
||||
|
||||
public function home()
|
||||
|
||||
@@ -53,18 +53,18 @@ class StatistikoEvent extends Model
|
||||
return $this->belongsTo(Sport::class, 'sport_id', 'id');
|
||||
}
|
||||
|
||||
public function league(): BelongsTo
|
||||
public function league()
|
||||
{
|
||||
return $this->belongsTo(CompetitionGroup::class, 'league_id', 'id');
|
||||
return $this->belongsTo(SofaScoreTournament::class, 'league_id', 'tournament_id');
|
||||
}
|
||||
|
||||
public function home(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'home_id', 'id');
|
||||
return $this->belongsTo(SofaScoreRosa::class, 'home_id', 'ss_team_id');
|
||||
}
|
||||
|
||||
public function away(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'away_id', 'id');
|
||||
return $this->belongsTo(SofaScoreRosa::class, 'away_id', 'ss_team_id');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user