41 lines
747 B
PHP
41 lines
747 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Supervisor extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'provider_id',
|
|
'sport_id',
|
|
'txodds_market_id',
|
|
'sleep',
|
|
'limit',
|
|
'runtime',
|
|
'commandline_options',
|
|
'maxsconds',
|
|
'lastcall',
|
|
'is_supervisor',
|
|
'is_active',
|
|
'days_from',
|
|
'days_to',
|
|
];
|
|
|
|
public function sport()
|
|
{
|
|
return $this->belongsTo(Sport::class)->where('is_active', 1);
|
|
}
|
|
|
|
public function provider()
|
|
{
|
|
return $this->belongsTo(Provider::class);
|
|
}
|
|
|
|
public function txodds_market()
|
|
{
|
|
return $this->belongsTo(TxoddsMarket::class);
|
|
}
|
|
}
|