Files
nuhodds_fi4/app/Models/Odds3way.php
T
2025-08-21 17:59:39 +02:00

55 lines
1.0 KiB
PHP

<?php
namespace App\Models;
use App\Enums\EnumMatchpart;
use App\Enums\EnumSuspended;
use Illuminate\Database\Eloquent\Model;
class Odds3way extends Model
{
protected $table = 'odds_3ways';
protected $fillable = [
'id',
'event_id',
'sport_id',
'matchpart_id',
'bookmaker_id',
'bookmaker',
'suspended',
'oddshash',
'home',
'draw',
'away',
'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');
}
}