provider, clients migration & resource
This commit is contained in:
1 parent
ab44b05fa3
commit
cbe68f78be
56 files changed
+721
-289
No files matched your search
+12
-10
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\EnumMatchpart;
|
||||
use App\Enums\EnumSuspended;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Odds2way extends Model
|
||||
@@ -16,38 +14,42 @@ class Odds2way extends Model
|
||||
'sport_id',
|
||||
'matchpart_id',
|
||||
'bookmaker_id',
|
||||
'bookmaker',
|
||||
'suspended',
|
||||
'oddshash',
|
||||
'provider_id',
|
||||
'home',
|
||||
'away',
|
||||
'margin',
|
||||
'flag',
|
||||
'check',
|
||||
'add_time',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'suspended' => EnumSuspended::class,
|
||||
'matchpart_id' => EnumMatchpart::class,
|
||||
];
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class, 'sport_id');
|
||||
return $this->belongsTo(Sport::class);
|
||||
}
|
||||
|
||||
public function bookmaker()
|
||||
{
|
||||
return $this->belongsTo(Bookmaker::class, 'bookmaker_id');
|
||||
return $this->belongsTo(Bookmaker::class);
|
||||
}
|
||||
|
||||
public function matchpart()
|
||||
{
|
||||
return $this->belongsTo(Matchpart::class, 'matchpart_id');
|
||||
return $this->belongsTo(Matchpart::class);
|
||||
}
|
||||
|
||||
public function event()
|
||||
{
|
||||
return $this->belongsTo(Event::class, 'event_id');
|
||||
return $this->belongsTo(Event::class);
|
||||
}
|
||||
|
||||
public function provider()
|
||||
{
|
||||
return $this->belongsTo(Provider::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user