55 lines
1.0 KiB
PHP
55 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\EnumMatchpart;
|
|
use App\Enums\EnumSuspended;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OddsTotal extends Model
|
|
{
|
|
protected $table = 'odds_totals';
|
|
|
|
protected $fillable = [
|
|
'id',
|
|
'event_id',
|
|
'sport_id',
|
|
'matchpart_id',
|
|
'bookmaker_id',
|
|
'bookmaker',
|
|
'suspended',
|
|
'oddshash',
|
|
'over',
|
|
'under',
|
|
'spread',
|
|
'margin',
|
|
'add_time',
|
|
'updated_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'suspended' => EnumSuspended::class,
|
|
'matchpart_id' => EnumMatchpart::class,
|
|
];
|
|
|
|
public function sport()
|
|
{
|
|
return $this->belongsTo(Sport::class, 'sport_id');
|
|
}
|
|
|
|
public function bookmaker()
|
|
{
|
|
return $this->belongsTo(Bookmaker::class, 'bookmaker_id');
|
|
}
|
|
|
|
public function matchpart()
|
|
{
|
|
return $this->belongsTo(Matchpart::class, 'matchpart_id');
|
|
}
|
|
|
|
public function event()
|
|
{
|
|
return $this->belongsTo(Event::class, 'event_id');
|
|
}
|
|
}
|