43 lines
824 B
PHP
43 lines
824 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Scopes\ClientScope;
|
|
use App\Models\Scopes\SportScope;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MultilineClient extends Model
|
|
{
|
|
protected $fillable = [
|
|
'client_id',
|
|
'sport_id',
|
|
'multiline_setting_id',
|
|
'disabled',
|
|
'bookmaker_id',
|
|
'sort',
|
|
];
|
|
|
|
public function sport()
|
|
{
|
|
return $this->belongsTo(Sport::class);
|
|
}
|
|
|
|
public function multiline_setting()
|
|
{
|
|
return $this->belongsTo(MultilineSetting::class);
|
|
}
|
|
|
|
public function bookmaker()
|
|
{
|
|
return $this->belongsTo(Bookmaker::class, 'bookmaker_id', 'txid');
|
|
}
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::addGlobalScope(new ClientScope);
|
|
|
|
static::addGlobalScope(new SportScope);
|
|
|
|
}
|
|
}
|