35 lines
663 B
PHP
35 lines
663 B
PHP
<?php
|
|
|
|
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',
|
|
'tournament_id',
|
|
'ss_liga_code',
|
|
'sofa_score_category_id',
|
|
'name',
|
|
'slug',
|
|
'enabled',
|
|
];
|
|
|
|
public function sport()
|
|
{
|
|
return $this->belongsTo(Sport::class);
|
|
}
|
|
|
|
public function sofascore_category()
|
|
{
|
|
return $this->belongsTo(SofaScoreCategory::class, 'sofa_score_category_id', 'id');
|
|
}
|
|
}
|