Files
nuhodds_fi4/app/Models/SofaScoreRosa.php
T
2026-08-25 08:03:22 +02:00

42 lines
862 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use MongoDB\Laravel\Eloquent\HybridRelations;
class SofaScoreRosa extends Model
{
use HybridRelations;
protected $connection = 'mariadb';
protected $fillable = [
'sport_id',
'cc',
'country_id',
'ss_team_id',
'ss_team_name',
'ss_tournament_id',
'slug',
'is_active',
'grapped',
'disabled',
];
public function country()
{
return $this->belongsTo(Country::class);
}
public function sofascore_category()
{
return $this->belongsTo(SofaScoreCategory::class, 'country_id', 'country_id')->where('in_soccer', 1);
}
public function tournament_rosa()
{
return $this->belongsTo(SofaScoreRosaTournament::class, 'ss_team_id', 'ss_team_id');
}
}