provider, clients migration & resource
This commit is contained in:
1 parent
ab44b05fa3
commit
cbe68f78be
56 files changed
+721
-289
No files matched your search
@@ -9,6 +9,7 @@ class Bookmaker extends Model
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'icon',
|
||||
'image',
|
||||
'baid',
|
||||
'txid',
|
||||
'txso',
|
||||
|
||||
+9
-13
@@ -6,19 +6,15 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Client extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'homepage',
|
||||
protected $casts = [
|
||||
'bookmaker' => 'json',
|
||||
'sport' => 'json',
|
||||
];
|
||||
|
||||
public function client_sports()
|
||||
{
|
||||
return $this->hasMany(ClientSports::class);
|
||||
}
|
||||
|
||||
public function client_bookmaker()
|
||||
{
|
||||
return $this->hasMany(ClientBookmaker::class);
|
||||
}
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'homepage',
|
||||
'bookmaker',
|
||||
'sport',
|
||||
];
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ClientBookmaker extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'client_id',
|
||||
'bookmaker_id',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(Client::class);
|
||||
}
|
||||
|
||||
public function bookmaker()
|
||||
{
|
||||
return $this->belongsTo(Bookmaker::class);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ClientSport extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'client_id',
|
||||
'sport_id',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(Client::class);
|
||||
}
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class);
|
||||
}
|
||||
}
|
||||
+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);
|
||||
}
|
||||
}
|
||||
+12
-10
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\EnumMatchpart;
|
||||
use App\Enums\EnumSuspended;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Odds3way extends Model
|
||||
@@ -16,39 +14,43 @@ class Odds3way extends Model
|
||||
'sport_id',
|
||||
'matchpart_id',
|
||||
'bookmaker_id',
|
||||
'bookmaker',
|
||||
'suspended',
|
||||
'oddshash',
|
||||
'provider_id',
|
||||
'home',
|
||||
'draw',
|
||||
'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);
|
||||
}
|
||||
}
|
||||
+12
-9
@@ -3,7 +3,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\EnumMatchpart;
|
||||
use App\Enums\EnumSuspended;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OddsDnb extends Model
|
||||
@@ -16,38 +15,42 @@ class OddsDnb extends Model
|
||||
'sport_id',
|
||||
'matchpart_id',
|
||||
'bookmaker_id',
|
||||
'bookmaker',
|
||||
'suspended',
|
||||
'oddshash',
|
||||
'provider_id',
|
||||
'dnb1',
|
||||
'dnb2',
|
||||
'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);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\EnumMatchpart;
|
||||
use App\Enums\EnumSuspended;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OddsHandicap extends Model
|
||||
@@ -16,39 +15,43 @@ class OddsHandicap extends Model
|
||||
'sport_id',
|
||||
'matchpart_id',
|
||||
'bookmaker_id',
|
||||
'bookmaker',
|
||||
'suspended',
|
||||
'oddshash',
|
||||
'provider_id',
|
||||
'home',
|
||||
'away',
|
||||
'handicap',
|
||||
'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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OddsQualify extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'event_id',
|
||||
'sport_id',
|
||||
'matchpart_id',
|
||||
'bookmaker_id',
|
||||
'provider_id',
|
||||
'htq',
|
||||
'atq',
|
||||
'margin',
|
||||
'flag',
|
||||
'check',
|
||||
'add_time',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'matchpart_id' => EnumMatchpart::class,
|
||||
];
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class);
|
||||
}
|
||||
|
||||
public function bookmaker()
|
||||
{
|
||||
return $this->belongsTo(Bookmaker::class);
|
||||
}
|
||||
|
||||
public function matchpart()
|
||||
{
|
||||
return $this->belongsTo(Matchpart::class);
|
||||
}
|
||||
|
||||
public function event()
|
||||
{
|
||||
return $this->belongsTo(Event::class);
|
||||
}
|
||||
|
||||
public function provider()
|
||||
{
|
||||
return $this->belongsTo(Provider::class);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\EnumMatchpart;
|
||||
use App\Enums\EnumSuspended;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OddsTotal extends Model
|
||||
@@ -16,39 +15,43 @@ class OddsTotal extends Model
|
||||
'sport_id',
|
||||
'matchpart_id',
|
||||
'bookmaker_id',
|
||||
'bookmaker',
|
||||
'suspended',
|
||||
'oddshash',
|
||||
'provider_id',
|
||||
'over',
|
||||
'under',
|
||||
'spread',
|
||||
'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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Provider extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
];
|
||||
}
|
||||
@@ -46,4 +46,9 @@ class User extends Authenticatable
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(Client::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user