db wip
This commit is contained in:
1 parent
68837ea1f4
commit
f8350fd319
8 files changed
+23
-43
No files matched your search
@@ -15,6 +15,11 @@ class ElementProvider extends Model
|
|||||||
'name',
|
'name',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function sport()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Sport::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function element()
|
public function element()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Element::class);
|
return $this->belongsTo(Element::class);
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ class Event extends Model
|
|||||||
static::addGlobalScope(new SportScope);
|
static::addGlobalScope(new SportScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function provider()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Provider::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function sport()
|
public function sport()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Sport::class);
|
return $this->belongsTo(Sport::class);
|
||||||
@@ -40,7 +45,7 @@ class Event extends Model
|
|||||||
|
|
||||||
public function country()
|
public function country()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Country::class, 'country_id', 'tx_id')->where('disabled', 0)->where('is_country', 1);
|
return $this->belongsTo(Country::class)->where('disabled', 0)->where('is_country', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function group()
|
public function group()
|
||||||
|
|||||||
@@ -23,4 +23,9 @@ class Group extends Model
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(Sport::class);
|
return $this->belongsTo(Sport::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function competition_group()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(CompetitionGroup::class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class GroupFilter extends Model
|
|
||||||
{
|
|
||||||
protected $fillable = [
|
|
||||||
'name',
|
|
||||||
'group_id',
|
|
||||||
'bkm_group_id',
|
|
||||||
'bookmaker_id',
|
|
||||||
];
|
|
||||||
|
|
||||||
public function group()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Group::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bookmaker()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Bookmaker::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -26,6 +26,11 @@ class Odds3way extends Model
|
|||||||
'updated_at',
|
'updated_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function event()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Event::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function sport()
|
public function sport()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Sport::class);
|
return $this->belongsTo(Sport::class);
|
||||||
@@ -36,11 +41,6 @@ class Odds3way extends Model
|
|||||||
return $this->belongsTo(Bookmaker::class, 'bookmaker_id', 'txid');
|
return $this->belongsTo(Bookmaker::class, 'bookmaker_id', 'txid');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function event()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Event::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function provider()
|
public function provider()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Provider::class);
|
return $this->belongsTo(Provider::class);
|
||||||
|
|||||||
@@ -24,16 +24,6 @@ class Supervisor extends Model
|
|||||||
return $this->belongsTo(Sport::class);
|
return $this->belongsTo(Sport::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bookmaker()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Bookmaker::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function customer()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(Customer::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function provider()
|
public function provider()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Provider::class);
|
return $this->belongsTo(Provider::class);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ return new class extends Migration
|
|||||||
$table->dateTime('starttime')->nullable();
|
$table->dateTime('starttime')->nullable();
|
||||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||||
$table->integer('group_id')->default(0)->nullable()->index();
|
$table->integer('group_id')->default(0)->nullable()->index()->references('id')->on('groups');
|
||||||
$table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups');
|
$table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups');
|
||||||
$table->integer('home_id')->default(0)->nullable()->index()->references('id')->on('elements');
|
$table->integer('home_id')->default(0)->nullable()->index()->references('id')->on('elements');
|
||||||
$table->integer('away_id')->default(0)->nullable()->index()->references('id')->on('elements');
|
$table->integer('away_id')->default(0)->nullable()->index()->references('id')->on('elements');
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ return new class extends Migration
|
|||||||
$table->integer('client_id')->default(0);
|
$table->integer('client_id')->default(0);
|
||||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||||
$table->boolean('disabled')->default(0);
|
$table->boolean('disabled')->default(0);
|
||||||
$table->integer('multiline_setting_id')->default(1);
|
$table->integer('multiline_setting_id')->default(1)->references('id')->on('multiline_settings');
|
||||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||||
$table->integer('position')->default(0);
|
$table->integer('position')->default(0);
|
||||||
$table->integer('sort')->default(0);
|
$table->integer('sort')->default(0);
|
||||||
|
|||||||
Reference in new issue
Block a user