rapper magloo nigeria fixtures ok
This commit is contained in:
1 parent
34690292aa
commit
9e7384daf8
46 files changed
+271
-1439
No files matched your search
@@ -11,6 +11,7 @@ use App\Models\OddsDnb;
|
|||||||
use App\Models\OddsGgng;
|
use App\Models\OddsGgng;
|
||||||
use App\Models\OddsTotal;
|
use App\Models\OddsTotal;
|
||||||
use App\Utilities\Margin;
|
use App\Utilities\Margin;
|
||||||
|
use App\Utilities\Notice;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class Bet365
|
class Bet365
|
||||||
@@ -18,16 +19,25 @@ class Bet365
|
|||||||
public static function grap()
|
public static function grap()
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
$debug = Nuh::$options['d'] ?? 0;
|
||||||
|
$break = Nuh::$options['b'] ?? 0;
|
||||||
|
$week = Nuh::$options['w'] ?? 0;
|
||||||
/**
|
/**
|
||||||
* Bet365
|
* Bet365
|
||||||
*/
|
*/
|
||||||
$bookmaker_id = 126;
|
$bookmaker_id = 126;
|
||||||
|
|
||||||
$events = Event::where('bet365_id', '>', 0)->where('events.starttime', '>', Carbon::now())->get();
|
$events = Event::where('bet365_id', '>', 0)->where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->select('id', 'sport_id', 'bet365_id', 'starttime')->get();
|
||||||
|
|
||||||
foreach ($events as $event) {
|
foreach ($events as $key => $event) {
|
||||||
|
|
||||||
|
if ($debug) {
|
||||||
|
Notice::note([
|
||||||
|
'id' => $event->id,
|
||||||
|
'bet365_id' => $event->bet365_id,
|
||||||
|
'starttime' => $event->starttime,
|
||||||
|
'count' => count($events).'/'.$key + 1,
|
||||||
|
], 'b');
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* BET365 ODDS (per event)
|
* BET365 ODDS (per event)
|
||||||
*/
|
*/
|
||||||
@@ -35,6 +45,8 @@ class Bet365
|
|||||||
|
|
||||||
$data = Curl::load($url);
|
$data = Curl::load($url);
|
||||||
|
|
||||||
|
if (isset($data['results'][0]['main'])) {
|
||||||
|
|
||||||
$offer = $data['results'][0]['main']['sp'];
|
$offer = $data['results'][0]['main']['sp'];
|
||||||
|
|
||||||
$base = [];
|
$base = [];
|
||||||
@@ -42,7 +54,6 @@ class Bet365
|
|||||||
$base['provider_id'] = Nuh::$options['provider_id'];
|
$base['provider_id'] = Nuh::$options['provider_id'];
|
||||||
$base['bmoid'] = $event->bet365_id;
|
$base['bmoid'] = $event->bet365_id;
|
||||||
$base['flag'] = 1;
|
$base['flag'] = 1;
|
||||||
$base['last_check_at'] = Carbon::now();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1X2
|
* 1X2
|
||||||
@@ -125,4 +136,5 @@ class Bet365
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ namespace App\Console\Commands\Grapper\Betsapi;
|
|||||||
|
|
||||||
use App\Console\Commands\Curl;
|
use App\Console\Commands\Curl;
|
||||||
use App\Console\Commands\Nuh;
|
use App\Console\Commands\Nuh;
|
||||||
use App\Mapper\FindEvent;
|
use App\Mapper\FindFixture;
|
||||||
use App\Mapper\LoadElements;
|
use App\Mapper\LoadElements;
|
||||||
use App\Mapper\LoadGroups;
|
use App\Mapper\LoadGroups;
|
||||||
use App\Models\Mapper;
|
use App\Models\Mapper;
|
||||||
@@ -95,7 +95,7 @@ class Fixtures
|
|||||||
'group_cc' => strtoupper($row['league']['cc']) ?? '',
|
'group_cc' => strtoupper($row['league']['cc']) ?? '',
|
||||||
];
|
];
|
||||||
|
|
||||||
FindEvent::search($event, self::$groups[$sport_id], self::$elements[$sport_id]);
|
FindFixture::search($event, self::$groups[$sport_id], self::$elements[$sport_id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ class Magloo
|
|||||||
{
|
{
|
||||||
public static function switch()
|
public static function switch()
|
||||||
{
|
{
|
||||||
|
|
||||||
Nuh::$options['proxy'] = 'https://proxydb1.nuhodds.com/MaglooProxy.php';
|
|
||||||
|
|
||||||
switch (Nuh::$options['name']) {
|
switch (Nuh::$options['name']) {
|
||||||
case 'Fixtures':
|
case 'Fixtures':
|
||||||
Fixtures::grap();
|
Fixtures::grap();
|
||||||
|
|||||||
@@ -3,25 +3,106 @@
|
|||||||
namespace App\Console\Commands\Grapper\Magloo;
|
namespace App\Console\Commands\Grapper\Magloo;
|
||||||
|
|
||||||
use App\Console\Commands\Curl;
|
use App\Console\Commands\Curl;
|
||||||
|
use App\Console\Commands\Grapper\Magloo\Odds\BaseUrl;
|
||||||
use App\Console\Commands\Nuh;
|
use App\Console\Commands\Nuh;
|
||||||
|
use App\Mapper\FindFixture;
|
||||||
|
use App\Mapper\LoadElements;
|
||||||
|
use App\Mapper\LoadGroups;
|
||||||
use App\Models\Sport;
|
use App\Models\Sport;
|
||||||
|
use App\Utilities\Notice;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class Fixtures
|
class Fixtures
|
||||||
{
|
{
|
||||||
|
public static $elements = [];
|
||||||
|
|
||||||
|
public static $groups = [];
|
||||||
|
|
||||||
public static function grap()
|
public static function grap()
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
$debug = Nuh::$options['d'] ?? 0;
|
||||||
$test = Nuh::$options['t'] ?? 0;
|
$proxy = Nuh::$options['p'] ?? 0;
|
||||||
$echo = Nuh::$options['e'] ?? 0;
|
|
||||||
|
|
||||||
dd(Nuh::$options);
|
$sportmap = Sport::map('magl', 1, [1, 3]);
|
||||||
|
|
||||||
$sportmap = Sport::map('magl');
|
self::$elements = LoadElements::load(Nuh::$options['provider_id']);
|
||||||
|
|
||||||
$url = Url::sports();
|
self::$groups = LoadGroups::load(Nuh::$options['provider_id']);
|
||||||
|
|
||||||
$file = Curl::load($url);
|
if ($proxy) {
|
||||||
|
Notice::note('PROXY USED', 'r');
|
||||||
|
}
|
||||||
|
|
||||||
dd($file);
|
if ($debug) {
|
||||||
|
Notice::note('FIXTURES '.Nuh::$options['process'], 'b');
|
||||||
|
}
|
||||||
|
|
||||||
|
$base_url = BaseUrl::get();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tornaments
|
||||||
|
*/
|
||||||
|
$url = $base_url.'/sport';
|
||||||
|
$data = Curl::load($url);
|
||||||
|
if (! is_array($data) or \count($data) == 0) {
|
||||||
|
Notice::note('no data in feed', 'r', 1);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ligas = [];
|
||||||
|
foreach ($data as $value) {
|
||||||
|
$magloo_sport_id = (int) $value['i'];
|
||||||
|
if (array_key_exists($magloo_sport_id, $sportmap)) {
|
||||||
|
$tmp = [];
|
||||||
|
$tmp['sport'] = $value['n'];
|
||||||
|
$tmp['sport_id'] = $sportmap[$magloo_sport_id];
|
||||||
|
$tmp['magloo_sport_id'] = $magloo_sport_id;
|
||||||
|
foreach ($value['C'] as $key => $val1) {
|
||||||
|
$tmp['country_id'] = $val1['i'];
|
||||||
|
$tmp['country'] = $val1['n'];
|
||||||
|
foreach ($val1['T'] as $key => $val2) {
|
||||||
|
$tmp['group_id'] = $val2['i'];
|
||||||
|
$tmp['group'] = $val2['n'];
|
||||||
|
$ligas[] = $tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($ligas as $liga) {
|
||||||
|
if ($liga['group'] && strpos($liga['group'], 'Simulated') === false) {
|
||||||
|
|
||||||
|
$sport_id = $liga['sport_id'];
|
||||||
|
|
||||||
|
$url = $base_url.'/tournament/'.$liga['group_id'].'/event';
|
||||||
|
|
||||||
|
$data = Curl::load($url);
|
||||||
|
|
||||||
|
foreach ($data as $magloo) {
|
||||||
|
|
||||||
|
// print_r($magloo);
|
||||||
|
|
||||||
|
$event = [];
|
||||||
|
$event['event_id'] = (int) $magloo['i'];
|
||||||
|
$event['betradar_id'] = (int) preg_replace('/\D/', '', $magloo['p']);
|
||||||
|
$event['sport_id'] = $sport_id;
|
||||||
|
$event['provider_id'] = Nuh::$options['provider_id'];
|
||||||
|
$event['starttime'] = strtotime($magloo['dt']);
|
||||||
|
$event['country_id'] = $liga['country_id'];
|
||||||
|
$event['country'] = $liga['country'];
|
||||||
|
$event['group_id'] = $liga['group_id'];
|
||||||
|
$event['group'] = $liga['group'];
|
||||||
|
$event['starttime'] = Carbon::parse($magloo['dt'])->toDateTimeString();
|
||||||
|
$teams = explode(' v ', str_replace('|', ' ', $magloo['n']));
|
||||||
|
$event['home_id'] = $magloo['htId'];
|
||||||
|
$event['home'] = addslashes($teams[0]);
|
||||||
|
$event['away_id'] = $magloo['atId'];
|
||||||
|
$event['away'] = addslashes($teams[1]);
|
||||||
|
|
||||||
|
FindFixture::search($event, self::$groups[$sport_id], self::$elements[$sport_id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+7
-7
@@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Console\Commands\Grapper\Magloo;
|
namespace App\Console\Commands\Grapper\Magloo\Odds;
|
||||||
|
|
||||||
use App\Console\Commands\Nuh;
|
use App\Console\Commands\Nuh;
|
||||||
use App\Utilities\Notice;
|
use App\Utilities\Notice;
|
||||||
|
|
||||||
class Url
|
class BaseUrl
|
||||||
{
|
{
|
||||||
public static function sports()
|
public static function get()
|
||||||
{
|
{
|
||||||
$test = Nuh::$options['t'] ?? 0;
|
$test = Nuh::$options['t'] ?? 0;
|
||||||
|
|
||||||
@@ -15,17 +15,17 @@ class Url
|
|||||||
case 3:
|
case 3:
|
||||||
// KENIA
|
// KENIA
|
||||||
if ($test) {
|
if ($test) {
|
||||||
return 'https://int.external.api.algorez.com/api/sb/affiliates/30/en/1/prematch/sport';
|
return 'https://int.external.api.algorez.com/api/sb/affiliates/30/en/1/prematch';
|
||||||
} else {
|
} else {
|
||||||
return 'https://api.externalsvc.com/api/sb/affiliates/30/en/1/prematch/sport';
|
return 'https://api.externalsvc.com/api/sb/affiliates/30/en/1/prematch';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// NIGERIA
|
// NIGERIA
|
||||||
if ($test) {
|
if ($test) {
|
||||||
return 'https://int.external.api.algorez.com/api/sb/affiliates/20/en/1/prematch/sport';
|
return 'https://int.external.api.algorez.com/api/sb/affiliates/20/en/1/prematch';
|
||||||
} else {
|
} else {
|
||||||
return 'https://api.externalsvc.com/api/sb/affiliates/20/en/1/prematch/sport';
|
return 'https://api.externalsvc.com/api/sb/affiliates/20/en/1/prematch';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -216,7 +216,6 @@ class Odds
|
|||||||
$odds['flag'] = 1;
|
$odds['flag'] = 1;
|
||||||
$odds['provider_id'] = Nuh::$options['provider_id'];
|
$odds['provider_id'] = Nuh::$options['provider_id'];
|
||||||
$odds['nuh_check'] = 0;
|
$odds['nuh_check'] = 0;
|
||||||
$odds['last_check_at'] = Carbon::now()->toDateTimeString();
|
|
||||||
|
|
||||||
foreach ($book->offer as $offer) {
|
foreach ($book->offer as $offer) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ class _3Way
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
// $debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
// if ($debug) {
|
||||||
Notice::note('1X2 '.Nuh::$bookmaker_id, 'b');
|
// Notice::note('1X2 '.Nuh::$bookmaker_id, 'b');
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach ($offer as $value) {
|
foreach ($offer as $value) {
|
||||||
$odds['h3w'] = (float) $value->o1;
|
$odds['h3w'] = (float) $value->o1;
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ class _Dc
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
// $debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
// if ($debug) {
|
||||||
Notice::note('Double Chance '.Nuh::$bookmaker_id, 'b');
|
// Notice::note('Double Chance '.Nuh::$bookmaker_id, 'b');
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach ($offer as $value) {
|
foreach ($offer as $value) {
|
||||||
$odds['dc1x'] = (float) $value->o1;
|
$odds['dc1x'] = (float) $value->o1;
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ class _Dnb
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
// $debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
// if ($debug) {
|
||||||
Notice::note('Draw No Bet '.Nuh::$bookmaker_id, 'b');
|
// Notice::note('Draw No Bet '.Nuh::$bookmaker_id, 'b');
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach ($offer as $value) {
|
foreach ($offer as $value) {
|
||||||
$odds['dnb1'] = (float) $value->o1;
|
$odds['dnb1'] = (float) $value->o1;
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ class _Ggng
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
// $debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
// if ($debug) {
|
||||||
Notice::note('Goal No Goal '.Nuh::$bookmaker_id, 'b');
|
// Notice::note('Goal No Goal '.Nuh::$bookmaker_id, 'b');
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach ($offer as $value) {
|
foreach ($offer as $value) {
|
||||||
$odds['gg'] = (float) $value->o1;
|
$odds['gg'] = (float) $value->o1;
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ class _Totals
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
// $debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
// if ($debug) {
|
||||||
Notice::note('Totals '.Nuh::$bookmaker_id, 'b');
|
// Notice::note('Totals '.Nuh::$bookmaker_id, 'b');
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach ($offer as $value) {
|
foreach ($offer as $value) {
|
||||||
$odds['over'] = (float) $value->o1;
|
$odds['over'] = (float) $value->o1;
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ class _Tq
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
// $debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
// if ($debug) {
|
||||||
Notice::note('To Qualify '.Nuh::$bookmaker_id, 'b');
|
// Notice::note('To Qualify '.Nuh::$bookmaker_id, 'b');
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach ($offer as $value) {
|
foreach ($offer as $value) {
|
||||||
$odds['htq'] = (float) $value->o1;
|
$odds['htq'] = (float) $value->o1;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class Nuh extends Command
|
|||||||
$txt .= '--e echo file'.PHP_EOL;
|
$txt .= '--e echo file'.PHP_EOL;
|
||||||
$txt .= '--f force update market'.PHP_EOL;
|
$txt .= '--f force update market'.PHP_EOL;
|
||||||
|
|
||||||
$txt .= '--p use proxy db1'.PHP_EOL;
|
$txt .= '--p use proxy'.PHP_EOL;
|
||||||
$txt .= '--q print queries'.PHP_EOL;
|
$txt .= '--q print queries'.PHP_EOL;
|
||||||
$txt .= '--r read data from file '.PHP_EOL;
|
$txt .= '--r read data from file '.PHP_EOL;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -197,13 +197,14 @@ class EventsTable
|
|||||||
->width(225)
|
->width(225)
|
||||||
->label('Totals'),
|
->label('Totals'),
|
||||||
])->searchable(['id', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id'])
|
])->searchable(['id', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id'])
|
||||||
->poll('10s')
|
->poll('5s')
|
||||||
->defaultSort('starttime', 'ASC')
|
->defaultSort('starttime', 'ASC')
|
||||||
->filters([
|
->filters([
|
||||||
Filter::make('events')
|
Filter::make('events')
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('country_id')
|
Select::make('country_id')
|
||||||
->placeholder('Country')
|
->placeholder('Country')
|
||||||
|
->columnSpan(2)
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->searchable()
|
->searchable()
|
||||||
@@ -223,7 +224,7 @@ class EventsTable
|
|||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->label('')
|
->label('')
|
||||||
->multiple()
|
->multiple()
|
||||||
->columnSpan(2)
|
->columnSpan(3)
|
||||||
->searchable()
|
->searchable()
|
||||||
->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
if ($get('country_id')) {
|
if ($get('country_id')) {
|
||||||
@@ -241,7 +242,7 @@ class EventsTable
|
|||||||
})
|
})
|
||||||
->live(),
|
->live(),
|
||||||
DateRangePicker::make('starttime_period')
|
DateRangePicker::make('starttime_period')
|
||||||
->columnSpan(2)
|
->columnSpan(4)
|
||||||
->startPrefix('From')
|
->startPrefix('From')
|
||||||
->displayFormat('d M Y')
|
->displayFormat('d M Y')
|
||||||
->minDate(now())
|
->minDate(now())
|
||||||
@@ -251,7 +252,8 @@ class EventsTable
|
|||||||
Action::make('reset')
|
Action::make('reset')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->color('gray')
|
->color('gray')
|
||||||
->icon('heroicon-o-arrow-path')
|
->keyBindings(['esc', 'escape'])
|
||||||
|
->icon('phosphor-x')
|
||||||
->action(function ($livewire) {
|
->action(function ($livewire) {
|
||||||
$livewire->resetTableFiltersForm(); // Clears all filters
|
$livewire->resetTableFiltersForm(); // Clears all filters
|
||||||
$livewire->tableSearch = ''; // Clears the main search bar
|
$livewire->tableSearch = ''; // Clears the main search bar
|
||||||
@@ -290,7 +292,7 @@ class EventsTable
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
->columns(6)->columnSpan(6),
|
->columns(10)->columnSpan(10),
|
||||||
], layout: FiltersLayout::AboveContent)
|
], layout: FiltersLayout::AboveContent)
|
||||||
->filtersFormColumns(6)
|
->filtersFormColumns(6)
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
|
|||||||
@@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Mapper;
|
namespace App\Mapper;
|
||||||
|
|
||||||
|
use App\Models\CompetitionGroupProvider;
|
||||||
|
use App\Models\ElementProvider;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Mapper;
|
use App\Models\Mapper;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class FindEvent
|
class FindFixture
|
||||||
{
|
{
|
||||||
public static function search($event, &$groups, &$elements)
|
public static function search($event, &$groups, &$elements)
|
||||||
{
|
{
|
||||||
@@ -18,6 +20,10 @@ class FindEvent
|
|||||||
|
|
||||||
$bet365_id = $event['bet365_id'] ?? 0;
|
$bet365_id = $event['bet365_id'] ?? 0;
|
||||||
|
|
||||||
|
$_1xbet_id = $event['_1xbet_id'] ?? 0;
|
||||||
|
|
||||||
|
$bwin_id = $event['bwin_id'] ?? 0;
|
||||||
|
|
||||||
unset($event['event_id']);
|
unset($event['event_id']);
|
||||||
|
|
||||||
switch ($event['provider_id']) {
|
switch ($event['provider_id']) {
|
||||||
@@ -41,34 +47,12 @@ class FindEvent
|
|||||||
// LOGIFUTUR COLOMBIA
|
// LOGIFUTUR COLOMBIA
|
||||||
$match_id = Event::where('logcol_id', $event_id)->value('id');
|
$match_id = Event::where('logcol_id', $event_id)->value('id');
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
Notice::note('unknown provider', 'r', 1);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($match_id) {
|
// DEFAULT BETRADAR
|
||||||
|
if (! $match_id && $betradar_id) {
|
||||||
Mapper::where('event_id', $event_id)->delete();
|
$match_id = Event::where('betradar_id', $betradar_id)->value('id');
|
||||||
|
|
||||||
$event = Event::where('id', $match_id)->first();
|
|
||||||
|
|
||||||
$update_array = [];
|
|
||||||
|
|
||||||
if ($betradar_id && ! $event->betradar_id) {
|
|
||||||
$update_array['betradar_id'] = $betradar_id;
|
|
||||||
}
|
}
|
||||||
if ($betsapi_id && ! $event->betsapi_id) {
|
|
||||||
$update_array['betsapi_id'] = $betsapi_id;
|
|
||||||
}
|
|
||||||
if ($bet365_id && ! $event->bet365_id) {
|
|
||||||
$update_array['bet365_id'] = $bet365_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($update_array) {
|
|
||||||
Event::where('id', $match_id)->update($update_array);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$home_id = $elements[$event['home_id']] ?? 0;
|
$home_id = $elements[$event['home_id']] ?? 0;
|
||||||
|
|
||||||
@@ -76,6 +60,88 @@ class FindEvent
|
|||||||
|
|
||||||
$cgid = $groups[$event['group_id']] ?? 0;
|
$cgid = $groups[$event['group_id']] ?? 0;
|
||||||
|
|
||||||
|
if ($match_id) {
|
||||||
|
|
||||||
|
Mapper::where('event_id', $event_id)->delete();
|
||||||
|
|
||||||
|
$match = Event::where('id', $match_id)->first();
|
||||||
|
|
||||||
|
if (! $home_id) {
|
||||||
|
$ele = [];
|
||||||
|
$ele['sport_id'] = $event['sport_id'];
|
||||||
|
$ele['provider_id'] = $event['provider_id'];
|
||||||
|
$ele['element_id'] = $match->home_id ?? 0;
|
||||||
|
$ele['name'] = $event['home'];
|
||||||
|
ElementProvider::updateOrCreate(['provider_element_id' => (int) $event['home_id']], $ele);
|
||||||
|
}
|
||||||
|
if (! $away_id) {
|
||||||
|
$ele = [];
|
||||||
|
$ele['sport_id'] = $event['sport_id'];
|
||||||
|
$ele['provider_id'] = $event['provider_id'];
|
||||||
|
$ele['element_id'] = $match->away_id ?? 0;
|
||||||
|
$ele['name'] = $event['away'];
|
||||||
|
ElementProvider::updateOrCreate(['provider_element_id' => (int) $event['away_id']], $ele);
|
||||||
|
}
|
||||||
|
if (! $cgid) {
|
||||||
|
$group = [];
|
||||||
|
$group['sport_id'] = $event['sport_id'];
|
||||||
|
$group['provider_id'] = $event['provider_id'];
|
||||||
|
$group['competition_group_id'] = $match->competition_group_id;
|
||||||
|
$group['name'] = $event['group'];
|
||||||
|
CompetitionGroupProvider::updateOrCreate(['provider_group_id' => (int) $event['group_id']], $group);
|
||||||
|
}
|
||||||
|
|
||||||
|
$update_array = [];
|
||||||
|
|
||||||
|
if ($betradar_id && ! $match->betradar_id) {
|
||||||
|
$update_array['betradar_id'] = $betradar_id;
|
||||||
|
}
|
||||||
|
if ($betsapi_id && ! $match->betsapi_id) {
|
||||||
|
$update_array['betsapi_id'] = $betsapi_id;
|
||||||
|
}
|
||||||
|
if ($bet365_id && ! $match->bet365_id) {
|
||||||
|
$update_array['bet365_id'] = $bet365_id;
|
||||||
|
}
|
||||||
|
if ($_1xbet_id && ! $match->_1xbet_id) {
|
||||||
|
$update_array['bet365_id'] = $_1xbet_id;
|
||||||
|
}
|
||||||
|
if ($bwin_id && ! $match->bwin_id) {
|
||||||
|
$update_array['bwin_id'] = $bwin_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// event_id
|
||||||
|
switch ($event['provider_id']) {
|
||||||
|
case 3:
|
||||||
|
// MAGLOO KENIA
|
||||||
|
if (! $match->magken_id) {
|
||||||
|
$update_array['magken_id'] = $event_id;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// MAGLOO NIGERIA
|
||||||
|
if (! $match->magnig_id) {
|
||||||
|
$update_array['magnig_id'] = $event_id;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
// LOGIFUTUR NIGERA
|
||||||
|
if (! $match->lognig_id) {
|
||||||
|
$update_array['lognig_id'] = $event_id;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
// LOGIFUTUR COLOMBIA
|
||||||
|
if (! $match->logcol_id) {
|
||||||
|
$update_array['logcol_id'] = $event_id;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($update_array) {
|
||||||
|
Event::where('id', $match_id)->update($update_array);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
$startime = $event['starttime'];
|
$startime = $event['starttime'];
|
||||||
|
|
||||||
if ($home_id && $away_id && $cgid) {
|
if ($home_id && $away_id && $cgid) {
|
||||||
@@ -15,6 +15,10 @@ class Event extends Model
|
|||||||
'bet365_id',
|
'bet365_id',
|
||||||
'_1xbet_id',
|
'_1xbet_id',
|
||||||
'bwin_id',
|
'bwin_id',
|
||||||
|
'magnig_id',
|
||||||
|
'magken_id',
|
||||||
|
'lognig_id',
|
||||||
|
'logcol_id',
|
||||||
'starttime',
|
'starttime',
|
||||||
'sport_id',
|
'sport_id',
|
||||||
'country_id',
|
'country_id',
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ class EventBookmaker extends Model
|
|||||||
'bmoid',
|
'bmoid',
|
||||||
'send_status',
|
'send_status',
|
||||||
'bkm_starttime',
|
'bkm_starttime',
|
||||||
'last_check_at',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function event()
|
public function event()
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ class Mapper extends Model
|
|||||||
'sport_id',
|
'sport_id',
|
||||||
'provider_id',
|
'provider_id',
|
||||||
'starttime',
|
'starttime',
|
||||||
|
'country',
|
||||||
|
'country_id',
|
||||||
'group',
|
'group',
|
||||||
'group_id',
|
'group_id',
|
||||||
'group_cc',
|
'group_cc',
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class Odds2way extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class Odds2wayS1 extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class Odds3way extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class OddsDc extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class OddsDnb extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class OddsGgng extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class OddsHandicap extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class OddsHandicapQ1 extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class OddsQualify extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class OddsTotal extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class OddsTotalQ1 extends Model
|
|||||||
'margin',
|
'margin',
|
||||||
'flag',
|
'flag',
|
||||||
'nuh_check',
|
'nuh_check',
|
||||||
'last_check_at',
|
|
||||||
'source_updated_at',
|
'source_updated_at',
|
||||||
'add_time',
|
'add_time',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
|
|||||||
+14
-3
@@ -7,13 +7,24 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class Sport extends Model
|
class Sport extends Model
|
||||||
{
|
{
|
||||||
public static function map($field, $_limit = [])
|
public static function map($field, $reverse = false, $limit = [])
|
||||||
{
|
{
|
||||||
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl'])) {
|
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl'])) {
|
||||||
Notice::note('Sport::map wrong option! Possible options: bapi, bwin, b365, logi, magl', 'r', 1);
|
Notice::note('Sport::map wrong option! Possible options: bapi, bwin, b365, logi, magl', 'r', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Sport::where('is_active', 1)->whereNotIn('id', $_limit)->pluck($field, 'id')->toArray();
|
if ($reverse) {
|
||||||
|
if ($limit) {
|
||||||
|
return Sport::where('is_active', 1)->whereIn('id', $limit)->pluck('id', $field)->toArray();
|
||||||
|
} else {
|
||||||
|
return Sport::where('is_active', 1)->pluck('id', $field)->toArray();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($limit) {
|
||||||
|
return Sport::where('is_active', 1)->whereIn($limit, 'id')->pluck('id', $field)->toArray();
|
||||||
|
} else {
|
||||||
|
return Sport::where('is_active', 1)->pluck($field, 'id')->toArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Utilities;
|
namespace App\Utilities;
|
||||||
|
|
||||||
|
use App\Models\Provider;
|
||||||
use App\Models\Supervisor;
|
use App\Models\Supervisor;
|
||||||
|
|
||||||
class Supervisorctl
|
class Supervisorctl
|
||||||
@@ -13,6 +14,7 @@ class Supervisorctl
|
|||||||
public static function start(&$options)
|
public static function start(&$options)
|
||||||
{
|
{
|
||||||
$debug = $options['d'] ?? 0;
|
$debug = $options['d'] ?? 0;
|
||||||
|
$proxy = $options['p'] ?? 0;
|
||||||
|
|
||||||
// sleep for 0,5 seconds
|
// sleep for 0,5 seconds
|
||||||
usleep(500000);
|
usleep(500000);
|
||||||
@@ -29,6 +31,10 @@ class Supervisorctl
|
|||||||
}
|
}
|
||||||
|
|
||||||
$options = array_merge($options, $supervisor->toArray());
|
$options = array_merge($options, $supervisor->toArray());
|
||||||
|
$options['process'] = Provider::where('id', $options['provider_id'])->value('name');
|
||||||
|
if ($proxy) {
|
||||||
|
$options['proxy'] = 'https://prox2.nuhodds.com/proxy.php';
|
||||||
|
}
|
||||||
|
|
||||||
if ($options['sleep'] > 0) {
|
if ($options['sleep'] > 0) {
|
||||||
if (! $debug) {
|
if (! $debug) {
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ return new class extends Migration
|
|||||||
$table->string('bmoid')->nullable();
|
$table->string('bmoid')->nullable();
|
||||||
$table->boolean('send_status')->default(0);
|
$table->boolean('send_status')->default(0);
|
||||||
$table->timestamp('bkm_starttime')->nullable();
|
$table->timestamp('bkm_starttime')->nullable();
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ return new class extends Migration
|
|||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('starting_time')->nullable();
|
$table->timestamp('starting_time')->nullable();
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ return new class extends Migration
|
|||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('starting_time')->nullable();
|
$table->timestamp('starting_time')->nullable();
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ return new class extends Migration
|
|||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('starting_time')->nullable();
|
$table->timestamp('starting_time')->nullable();
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ return new class extends Migration
|
|||||||
$table->decimal('margin', 5, 1)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('nuh_check')->default(0);
|
$table->boolean('nuh_check')->default(0);
|
||||||
$table->timestamp('last_check_at')->nullable();
|
|
||||||
$table->timestamp('source_updated_at')->nullable();
|
$table->timestamp('source_updated_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ return new class extends Migration
|
|||||||
$table->integer('sport_id')->index();
|
$table->integer('sport_id')->index();
|
||||||
$table->integer('provider_id')->default(0)->nullable()->index();
|
$table->integer('provider_id')->default(0)->nullable()->index();
|
||||||
$table->dateTime('starttime')->nullable();
|
$table->dateTime('starttime')->nullable();
|
||||||
|
$table->string('country')->nullable();
|
||||||
|
$table->integer('country_id')->default(0)->nullable()->index();
|
||||||
$table->string('group')->nullable();
|
$table->string('group')->nullable();
|
||||||
$table->integer('group_id')->default(0)->nullable()->index();
|
$table->integer('group_id')->default(0)->nullable()->index();
|
||||||
$table->string('group_cc')->nullable();
|
$table->string('group_cc')->nullable();
|
||||||
|
|||||||
@@ -14,14 +14,15 @@ class SupervisorSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
$sql = "INSERT INTO `supervisors` (`id`, `name`, `provider_id`, `sport_id`, `sleep`, `limit`, `runtime`, `maxsconds`, `lastcall`, `is_cron`, `is_active`, `created_at`, `updated_at`)
|
$sql = "INSERT INTO `supervisors` (`id`, `name`, `provider_id`, `sport_id`, `sleep`, `limit`, `runtime`, `maxsconds`, `lastcall`, `is_cron`, `is_active`, `created_at`, `updated_at`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Fixtures', 1, 1, 10, 0, '0.042', 1800, 0, 1, 1, '2025-08-27 07:39:55', '2025-12-22 05:20:19'),
|
(1, 'Fixtures', 1, 1, 10, 0, '0.59', 1800, 0, 1, 1, '2025-08-27 07:39:55', '2026-01-03 09:55:09'),
|
||||||
(2, 'Odds', 1, 1, 10, 0, '0.251', 30, 0, 0, 1, '2025-12-01 05:41:02', '2025-12-22 05:20:40'),
|
(2, 'Odds', 1, 1, 10, 0, '0.251', 30, 0, 0, 1, '2025-12-01 05:41:02', '2025-12-22 05:20:40'),
|
||||||
(3, 'Fixtures', 2, 0, 15, 0, NULL, 1800, 0, 1, 1, '2025-12-19 11:42:35', '2025-12-22 06:41:47'),
|
(3, 'Fixtures', 2, 0, 15, 0, NULL, 1800, 0, 1, 1, '2025-12-19 11:42:35', '2025-12-22 06:41:47'),
|
||||||
(4, 'Willhill', 2, 0, 15, 0, '0.235', 1800, 0, 1, 1, '2025-12-19 11:48:05', '2025-12-22 06:41:51'),
|
(4, 'Willhill', 2, 0, 15, 0, '0.235', 1800, 0, 1, 1, '2025-12-19 11:48:05', '2025-12-22 06:41:51'),
|
||||||
(5, 'Bwin', 2, 0, 15, 0, NULL, 1800, 0, 1, 1, '2025-12-22 06:41:18', '2025-12-22 06:41:52'),
|
(5, 'Bwin', 2, 0, 15, 0, '0.436', 1800, 0, 1, 1, '2025-12-22 06:41:18', '2026-01-03 10:12:40'),
|
||||||
(6, 'Bet365', 2, 0, 10, 0, '0', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-01 17:09:28'),
|
(6, 'Bet365', 2, 0, 10, 0, '0', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-01 17:09:28'),
|
||||||
(7, 'Betfair', 2, 0, 10, 0, '0', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-01 17:09:35'),
|
(7, 'Betfair', 2, 0, 10, 0, '0', 30, 0, 0, 0, '2025-12-18 17:44:33', '2026-01-03 12:28:09'),
|
||||||
(8, 'Fixtures', 4, 0, 10, 0, '0', 30, 0, 1, 1, '2025-12-18 17:44:33', '2026-01-01 17:08:53');
|
(8, 'Fixtures', 4, 0, 10, 0, '1.368', 30, 0, 1, 1, '2025-12-18 17:44:33', '2026-01-03 12:24:52'),
|
||||||
|
(9, 'Odds', 5, 0, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-03 12:27:53');
|
||||||
";
|
";
|
||||||
DB::unprepared($sql);
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user