This commit is contained in:
salam committed 2026-01-08 19:57:49 +01:00
1 parent 4f9125ef12
commit 61418c8cee
47 files changed
+726 -221

No files matched your search

+5 -7
View File
@@ -16,13 +16,11 @@ class BettypUserGenerator
foreach ($multilines as $multiline) { foreach ($multilines as $multiline) {
BettypeUser::firstOrCreate( $is_active = in_array($multiline->id, [1, 6, 7, 10, 8, 12, 15, 16, 17]) ? 1 : 0;
[
'user_id' => $user_id, BettypeUser::updateOrCreate(
'sport_id' => $multiline->sport_id, ['user_id' => (int) $user_id, 'multiline_setting_id' => (int) $multiline->id, 'sport_id' => (int) $multiline->sport_id],
'multiline_setting_id' => $multiline->id, ['is_active' => (int) $is_active]
'is_active' => in_array($multiline->id, [1, 8, 12, 15]) ? 1 : 0,
]
); );
} }
+5 -5
View File
@@ -12,8 +12,8 @@ use App\Models\Event;
use App\Models\EventBookmaker; use App\Models\EventBookmaker;
use App\Models\Odds3way; use App\Models\Odds3way;
use App\Models\OddsDc; use App\Models\OddsDc;
use App\Models\OddsHandicap; use App\Models\OddsPoint;
use App\Models\OddsHandicapQ1; use App\Models\OddsPointQ1;
use App\Models\OddsTotal; use App\Models\OddsTotal;
use App\Models\OddsTotalQ1; use App\Models\OddsTotalQ1;
use App\Models\OddsTq; use App\Models\OddsTq;
@@ -153,7 +153,7 @@ class Odds
$odds = FilterHandicap::get($value); $odds = FilterHandicap::get($value);
$odds['starttime'] = $starttime; $odds['starttime'] = $starttime;
OddsHandicap::updateOrCreate([ OddsPoint::updateOrCreate([
'event_id' => $event_id, 'event_id' => $event_id,
'bookmaker_id' => $bookmaker_id, 'bookmaker_id' => $bookmaker_id,
], $base + $odds); ], $base + $odds);
@@ -162,7 +162,7 @@ class Odds
case 2000: case 2000:
// points qt // points qt
$odds = FilterHandicap::get($value); $odds = FilterHandicap::get($value);
OddsHandicap::updateOrCreate([ OddsPoint::updateOrCreate([
'event_id' => $event_id, 'event_id' => $event_id,
'bookmaker_id' => $bookmaker_id, 'bookmaker_id' => $bookmaker_id,
], $base + $odds); ], $base + $odds);
@@ -171,7 +171,7 @@ class Odds
case 2025: case 2025:
// points qt // points qt
$odds = FilterHandicapQ1::get($value); $odds = FilterHandicapQ1::get($value);
OddsHandicapQ1::updateOrCreate([ OddsPointQ1::updateOrCreate([
'event_id' => $event_id, 'event_id' => $event_id,
'bookmaker_id' => $bookmaker_id, 'bookmaker_id' => $bookmaker_id,
], $base + $odds); ], $base + $odds);
-6
View File
@@ -11,12 +11,6 @@ class TxOdds
{ {
public static function switch() public static function switch()
{ {
if (Nuh::$options['sport_id'] == 1) {
Nuh::$AUTHTOKEN = 'ident=betaid1&passwd=Dy59vpRC';
} else {
Nuh::$AUTHTOKEN = 'ident=betaid2&passwd=Dy59vpRC';
}
switch (Nuh::$options['name']) { switch (Nuh::$options['name']) {
case 'Fixtures': case 'Fixtures':
Fixtures::grap(); Fixtures::grap();
@@ -8,6 +8,7 @@ use App\Models\CompetitionGroup;
use App\Models\Element; use App\Models\Element;
use App\Models\Event; use App\Models\Event;
use App\Models\Group; use App\Models\Group;
use App\Models\Sport;
use App\Utilities\Notice; use App\Utilities\Notice;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
@@ -16,12 +17,12 @@ class Fixtures
public static function grap() public static function grap()
{ {
$debug = Nuh::$options['d'] ?? 0; $debug = Nuh::$options['d'] ?? 0;
$echo = Nuh::$options['e'] ?? 0; $today = Nuh::$options['t'] ?? 0;
$break = Nuh::$options['t'] ?? 0;
$week = Nuh::$options['w'] ?? 0; $week = Nuh::$options['w'] ?? 0;
$count = 0; $count = 0;
$total = 0; $total_soccer = 0;
$total_others = 0;
$now = Carbon::now(); $now = Carbon::now();
@@ -35,81 +36,94 @@ class Fixtures
Notice::note("Deleted: $info"); Notice::note("Deleted: $info");
} }
$sports = Sport::where('is_active', 1)->pluck('id')->toArray();
/** /**
* Grap * Grap
*/ */
for ($i = Nuh::$options['days_from']; $i < Nuh::$options['days_to']; $i++) { $AUTHTOKEN = [
'SOCCER' => 'ident=betaid1&passwd=Dy59vpRC',
'OTHER' => 'ident=betaid2&passwd=Dy59vpRC',
];
$url = 'https://xml2.txodds.com/feed/result/xml.php?'.Nuh::$AUTHTOKEN.'&date='.$now->toDateString().','.$now->addDays(1)->toDateString(); foreach ($AUTHTOKEN as $konto => $authentication) {
// code...
$data = Xml::load($url); if ($today) {
Nuh::$options['days_from'] = 0;
if ($echo) { Nuh::$options['days_to'] = 1;
dd($data); } elseif ($week) {
Nuh::$options['days_from'] = 0;
Nuh::$options['days_to'] = 6;
} }
foreach ($data as $row) { for ($i = Nuh::$options['days_from']; $i < Nuh::$options['days_to']; $i++) {
$event = [ $url = "https://xml2.txodds.com/feed/result/xml.php?$authentication&days=$i,1";
'provider_id' => (int) Nuh::$options['provider_id'],
'starttime' => Carbon::createFromDate((string) $row->time)->toDateTimeString(),
'sport_id' => (int) $row->group['spid'],
'home_id' => (int) $row->hteam['id'],
'away_id' => (int) $row->ateam['id'],
'country_id' => (int) $row->group['cnid'],
'group_id' => (int) $row->group['id'],
'competition_group_id' => (int) $row->group['cgid'],
];
Event::updateOrCreate(['id' => (int) $row['id']], $event); $data = Xml::load($url);
$group = [ foreach ($data as $row) {
'competition_group_id' => (string) $row->group['cgid'],
'sport_id' => (int) $row->group['spid'],
'country_id' => (int) $row->group['cnid'],
'name' => (string) $row->group,
];
Group::updateOrCreate(['id' => (int) $row->group['id']], $group);
$compgroup = [ $sport_id = (int) $row->group['spid'];
'sport_id' => $event['sport_id'],
'country_id' => $event['country_id'],
'name' => (string) $row->group['cname'],
];
CompetitionGroup::updateOrCreate(['id' => (int) $row->group['cgid']], $compgroup); if (in_array($sport_id, $sports)) {
$element = [ $event = [
'name' => (string) $row->hteam, 'provider_id' => (int) Nuh::$options['provider_id'],
'sport_id' => (int) $row->group['spid'], 'starttime' => Carbon::createFromDate((string) $row->time)->toDateTimeString(),
]; 'sport_id' => (int) $sport_id,
Element::updateOrCreate(['id' => (int) $row->hteam['id']], $element); 'home_id' => (int) $row->hteam['id'],
'away_id' => (int) $row->ateam['id'],
'country_id' => (int) $row->group['cnid'],
'group_id' => (int) $row->group['id'],
'competition_group_id' => (int) $row->group['cgid'],
];
$element = [ Event::updateOrCreate(['id' => (int) $row['id']], $event);
'name' => (string) $row->ateam,
'sport_id' => (int) $row->group['spid'],
];
Element::updateOrCreate(['id' => (int) $row->ateam['id']], $element);
$count++; $group = [
'competition_group_id' => (string) $row->group['cgid'],
'sport_id' => (int) $sport_id,
'country_id' => (int) $row->group['cnid'],
'name' => (string) $row->group,
];
Group::updateOrCreate(['id' => (int) $row->group['id']], $group);
$compgroup = [
'sport_id' => (int) $sport_id,
'country_id' => $event['country_id'],
'name' => (string) $row->group['cname'],
];
CompetitionGroup::updateOrCreate(['id' => (int) $row->group['cgid']], $compgroup);
$element = [
'name' => (string) $row->hteam,
'sport_id' => (int) $sport_id,
];
Element::updateOrCreate(['id' => (int) $row->hteam['id']], $element);
$element = [
'name' => (string) $row->ateam,
'sport_id' => (int) $sport_id,
];
Element::updateOrCreate(['id' => (int) $row->ateam['id']], $element);
if ($sport_id == 1) {
$total_soccer++;
} else {
$total_others++;
}
}
}
} }
if ($debug) { if ($debug) {
Notice::note($now->toDateString()." - $count events processed", 'g'); Notice::note($now->toDateString()." - $count events processed", 'g');
} }
$total += $count;
if ($break) {
break;
}
if ($week && $i == 7) {
break;
}
} }
if ($debug) { if ($debug) {
Notice::note("Total - $total events processed", 'g'); Notice::note("Total Soccer - $total_soccer\nTotal Others - $total_others", 'g');
} }
} }
} }
+120 -59
View File
@@ -2,11 +2,16 @@
namespace App\Console\Commands\Grapper\TxOdds; namespace App\Console\Commands\Grapper\TxOdds;
use App\Console\Commands\Grapper\TxOdds\Odds\_2Way;
use App\Console\Commands\Grapper\TxOdds\Odds\_2WayS1;
use App\Console\Commands\Grapper\TxOdds\Odds\_3Way; use App\Console\Commands\Grapper\TxOdds\Odds\_3Way;
use App\Console\Commands\Grapper\TxOdds\Odds\_Dc; use App\Console\Commands\Grapper\TxOdds\Odds\_Dc;
use App\Console\Commands\Grapper\TxOdds\Odds\_Dnb; use App\Console\Commands\Grapper\TxOdds\Odds\_Dnb;
use App\Console\Commands\Grapper\TxOdds\Odds\_Ggng; use App\Console\Commands\Grapper\TxOdds\Odds\_Ggng;
use App\Console\Commands\Grapper\TxOdds\Odds\_Points;
use App\Console\Commands\Grapper\TxOdds\Odds\_PointsHt;
use App\Console\Commands\Grapper\TxOdds\Odds\_Totals; use App\Console\Commands\Grapper\TxOdds\Odds\_Totals;
use App\Console\Commands\Grapper\TxOdds\Odds\_TotalsHt;
use App\Console\Commands\Grapper\TxOdds\Odds\_Tq; use App\Console\Commands\Grapper\TxOdds\Odds\_Tq;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Console\Commands\Xml; use App\Console\Commands\Xml;
@@ -38,52 +43,49 @@ class Odds
} }
/************************************************* /*************************************************
* SINGLE SOCCER * https://xml2.txodds.com/feed/odds_types.php
* https://xml2.txodds.com/feed/odds/xml.php?ident=betaid1&passwd=Dy59vpRC&peid=3118930
* SINGLE OTHER * BETTYPE IDS
************************************************* 0 3-WAY
* https://xml2.txodds.com/feed/odds/xml.php?ident=betaid2&passwd=Dy59vpRC&peid=3118930 1 2-WAY
3 POINTS
4 TOTALS
************************************************* 131073 MONEY LINE - Q1
* https://xml2.txodds.com/feed/odds_types.php
* BETTYPE IDS 65536 3-WAY HALF TIME
0 3-WAY 65540 TOTALS HALF TIME
1 2-WAY 65539 POINTS HALF TIME
3 POINTS
4 TOTALS
5 Asian
65536 3-WAY HALF TIME
131072 3 WAY QUARTER TIME
65539 POINTS HALF TIME
131075 POINTS QUARTER TIME
262147 POINTS OVER TIME
65540 TOTALS HALF TIME
131076 TOTALS QUARTER TIME
262148 TOTALS OVER TIME
11534337 GG/NG (both teams to score)
5242880 DOUBLE CHANCE
7340033 TO PROGRESS (to qualify)
6291457 DRAW NO BET
Not used: 131075 POINTS QUARTER TIME
131076 TOTALS QUARTER TIME
65537 2-WAY HALF TIME 5242880 DOUBLE CHANCE
327680 3-WAY 2ND HALF 6291457 DRAW NO BET
327681 2-WAY 2ND HALF 11534337 GG/NG (both teams to score)
327683 POINT 2ND HALF 7340033 TO PROGRESS (to qualify)
327684 TOTALS 2ND HALF
1048577 GOAL / NO GOAL
2097153 ODD / EVEN Not used:
4194304 TOTAL GOALS 5 Asian
8388608 1X2 EURO HANDCIAP 131072 3 WAY QUARTER TIME
9437188 TOTAL CORNERS 262148 TOTALS OVER TIME
9502724 TOTAL CORNERS 1ST HALF 262147 POINTS OVER TIME
20971520 3-WAY CORNERS
28311555 HANDICAP SETS 65537 2-WAY HALF TIME
28311556 TOTAL SETS 327680 3-WAY 2ND HALF
327681 2-WAY 2ND HALF
327683 POINT 2ND HALF
327684 TOTALS 2ND HALF
1048577 GOAL / NO GOAL
2097153 ODD / EVEN
4194304 TOTAL GOALS
8388608 1X2 EURO HANDCIAP
9437188 TOTAL CORNERS
9502724 TOTAL CORNERS 1ST HALF
20971520 3-WAY CORNERS
28311555 HANDICAP SETS
28311556 TOTAL SETS
*************************************************/ *************************************************/
@@ -91,21 +93,49 @@ class Odds
switch (Nuh::$options['sport_id']) { switch (Nuh::$options['sport_id']) {
case 1: case 1:
$markets = '0,4,11534337,5242880,7340033,6291457'; /**
* 0 3-WAY
* 4 TOTALS
* 65536 3-WAY HALF TIME
* 65540 TOTALS HALF TIME
* 11534337 GG/NG (both teams to score)
* 5242880 DOUBLE CHANCE
* 7340033 TO PROGRESS (to qualify)
* 6291457 DRAW NO BET
*/
$markets = '0,4,65536,65540,11534337,5242880,7340033,6291457';
break; break;
case 2: case 2:
// needs check /**
$markets = '0,1,3,4,262148,131072,131076'; * 0 3-WAY
* 1 2-WAY
* 3 POINTS
* 4 TOTALS
* 131075 POINTS QUARTER TIME
* 131076 TOTALS QUARTER TIME
*/
$markets = '0,1,3,4,131076,131075';
break; break;
case 3: case 3:
// needs check /**
$markets = '0,1,3,4,262147,262148,65539,65540,131075,131076'; * 1 2-WAY
* 3 POINTS
* 4 TOTALS
* 65539 POINTS HALF TIME
* 65540 TOTALS HALF TIME
* 131075 POINTS QUARTER TIME
* 131076 TOTALS QUARTER TIME
*/
$markets = '1,3,4,65539,65540,131075,131076';
break; break;
case 5: case 5:
$markets = '1,3,4'; /**
break; * 1 2-WAY
case 8: * 3 POINTS
$markets = '0,3,4'; * 4 TOTALS
* 131073 MONEY LINE - Q1
*/
$markets = '1,3,4,131073';
break; break;
default: default:
Notice::note('sport not defined', 'r', 1); Notice::note('sport not defined', 'r', 1);
@@ -115,22 +145,28 @@ class Odds
/************************************************* /*************************************************
* URL * URL
*************************************************/ *************************************************/
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.Nuh::$AUTHTOKEN.'&all_odds=2&spid='.Nuh::$options['sport_id']; if (Nuh::$options['sport_id'] == 1) {
$AUTHTOKEN = 'ident=betaid1&passwd=Dy59vpRC';
} else {
$AUTHTOKEN = 'ident=betaid2&passwd=Dy59vpRC';
}
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.$AUTHTOKEN.'&all_odds=2';
$_calls = []; $_calls = [];
if (Nuh::$options['id']) { if (Nuh::$options['id']) {
if ($debug) { if ($debug) {
Notice::note('BY ID', 'p'); Notice::note('BY ID', 'p');
} }
/** /**
* BY ID * by SINGLE ID
*/ */
$_calls[] = $url."&ot=$markets&peid=".Nuh::$options['id']; $_calls[] = $url."&ot=$markets&peid=".Nuh::$options['id'];
} elseif (Nuh::$options['a']) { } elseif (Nuh::$options['a']) {
if ($debug) { if ($debug) {
Notice::note('ALL EXISTING', 'p'); Notice::note('ALL', 'p');
} }
/** /**
* ALL EXISTING * ALL by ID
*/ */
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->pluck('id'); $res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->pluck('id');
foreach ($res as $id) { foreach ($res as $id) {
@@ -142,8 +178,7 @@ class Odds
} }
/** /**
* PER GROUP_ID * PER GROUP_ID
* * with from-to
* with from-to days
*/ */
$groupids = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->groupBy('group_id')->pluck('group_id'); $groupids = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->groupBy('group_id')->pluck('group_id');
foreach ($groupids as $groupid) { foreach ($groupids as $groupid) {
@@ -158,7 +193,7 @@ class Odds
*/ */
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->pluck('id'); $res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->pluck('id');
foreach ($res as $id) { foreach ($res as $id) {
$_calls[] = $url."&ot=$markets&peid=".$id; $_calls[] = $url.'&spid='.Nuh::$options['sport_id']."&ot=$markets&peid=".$id;
} }
} elseif (Nuh::$options['w']) { } elseif (Nuh::$options['w']) {
if ($debug) { if ($debug) {
@@ -180,11 +215,9 @@ class Odds
* with from-to days * with from-to days
*/ */
$_calls[] = $url."&ot=$markets&days=".Nuh::$options['days_from'].','.Nuh::$options['days_to'].'&last='.Nuh::$options['lastcall']; $_calls[] = $url.'&spid='.Nuh::$options['sport_id']."&ot=$markets&days=".Nuh::$options['days_from'].','.Nuh::$options['days_to'].'&last='.Nuh::$options['lastcall'];
} }
dd($_calls);
/************************************************* /*************************************************
* CALL * CALL
*************************************************/ *************************************************/
@@ -276,9 +309,37 @@ class Odds
case 0: case 0:
_3Way::grap($odds, $offer); _3Way::grap($odds, $offer);
break; break;
case 1:
_2Way::grap($odds, $offer);
break;
case 3:
_Points::grap($odds, $offer);
break;
case 4: case 4:
_Totals::grap($odds, $offer); _Totals::grap($odds, $offer);
break; break;
case 131073:
_2WayS1::grap($odds, $offer);
break;
case 65536:
_3WayHt::grap($odds, $offer);
break;
case 65540:
_TotalsHt::grap($odds, $offer);
break;
case 65539:
_PointsHt::grap($odds, $offer);
break;
case 131075:
_PointsQt::grap($odds, $offer);
break;
case 131076:
_TotalsQt::grap($odds, $offer);
break;
case 5242880: case 5242880:
_Dc::grap($odds, $offer); _Dc::grap($odds, $offer);
break; break;
@@ -0,0 +1,25 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\Odds2way;
use App\Utilities\Margin;
class _2Way
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['h2w'] = (float) $value->o1;
$odds['a2w'] = (float) $value->o3;
$odds['starttime'] = (string) $value['starttime'];
}
$odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1);
Odds2way::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
], $odds);
}
}
@@ -0,0 +1,25 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\Odds2wayS1;
use App\Utilities\Margin;
class _2WayS1
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['h2w'] = (float) $value->o1;
$odds['a2w'] = (float) $value->o3;
$odds['starttime'] = (string) $value['starttime'];
}
$odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1);
Odds2wayS1::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
], $odds);
}
}
@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\Odds3way; use App\Models\Odds3way;
use App\Utilities\Margin; use App\Utilities\Margin;
use App\Utilities\Notice;
class _3Way class _3Way
{ {
public static function grap($odds, $offer) public static function grap($odds, $offer)
{ {
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// 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;
$odds['d3w'] = (float) $value->o2; $odds['d3w'] = (float) $value->o2;
@@ -0,0 +1,25 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Utilities\Margin;
class _3WayHt
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['h3w'] = (float) $value->o1;
$odds['d3w'] = (float) $value->o2;
$odds['a3w'] = (float) $value->o3;
$odds['starttime'] = (string) $value['starttime'];
}
$odds['margin'] = (float) Margin::calculate([$odds['h3w'], $odds['d3w'], $odds['a3w']], 1);
Odds3wayHt::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
], $odds);
}
}
@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\OddsDc; use App\Models\OddsDc;
use App\Utilities\Margin; use App\Utilities\Margin;
use App\Utilities\Notice;
class _Dc class _Dc
{ {
public static function grap($odds, $offer) public static function grap($odds, $offer)
{ {
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// 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;
$odds['dc12'] = (float) $value->o2; $odds['dc12'] = (float) $value->o2;
@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\OddsDnb; use App\Models\OddsDnb;
use App\Utilities\Margin; use App\Utilities\Margin;
use App\Utilities\Notice;
class _Dnb class _Dnb
{ {
public static function grap($odds, $offer) public static function grap($odds, $offer)
{ {
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// 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;
$odds['dnb2'] = (float) $value->o3; $odds['dnb2'] = (float) $value->o3;
@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\OddsGgng; use App\Models\OddsGgng;
use App\Utilities\Margin; use App\Utilities\Margin;
use App\Utilities\Notice;
class _Ggng class _Ggng
{ {
public static function grap($odds, $offer) public static function grap($odds, $offer)
{ {
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// 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;
$odds['ng'] = (float) $value->o3; $odds['ng'] = (float) $value->o3;
@@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\OddsPoint;
use App\Utilities\Margin;
class _Points
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['home'] = (float) $value->o1;
$odds['away'] = (float) $value->o2;
$odds['handicap'] = (float) $value->o3;
}
$odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
OddsPoint::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
'handicap' => $odds['handicap'],
], $odds);
}
}
@@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\OddsPointHt;
use App\Utilities\Margin;
class _PointsHt
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['home'] = (float) $value->o1;
$odds['away'] = (float) $value->o2;
$odds['handicap'] = (float) $value->o3;
}
$odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
OddsPointHt::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
'handicap' => $odds['handicap'],
], $odds);
}
}
@@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\OddsPointQ1;
use App\Utilities\Margin;
class _PointsQ1
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['home'] = (float) $value->o1;
$odds['away'] = (float) $value->o2;
$odds['handicap'] = (float) $value->o3;
}
$odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
OddsPointQ1::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
'handicap' => $odds['handicap'],
], $odds);
}
}
@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\OddsTotal; use App\Models\OddsTotal;
use App\Utilities\Margin; use App\Utilities\Margin;
use App\Utilities\Notice;
class _Totals class _Totals
{ {
public static function grap($odds, $offer) public static function grap($odds, $offer)
{ {
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// 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;
$odds['under'] = (float) $value->o2; $odds['under'] = (float) $value->o2;
@@ -30,10 +23,12 @@ class _Totals
} }
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1); $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
OddsTotal::updateOrCreate([ OddsTotal::updateOrCreate([
'event_id' => Nuh::$id, 'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id, 'bookmaker_id' => Nuh::$bookmaker_id,
'total' => $odds['total'],
], $odds); ], $odds);
} }
} }
@@ -0,0 +1,27 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Utilities\Margin;
class _TotalsHt
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['over'] = (float) $value->o1;
$odds['under'] = (float) $value->o2;
$odds['total'] = (float) $value->o3;
}
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
OddsTotalHt::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
'total' => $odds['total'],
], $odds);
}
}
@@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\OddsTotalQ1;
use App\Utilities\Margin;
class _TotalsQ1
{
public static function grap($odds, $offer)
{
foreach ($offer as $value) {
$odds['over'] = (float) $value->o1;
$odds['under'] = (float) $value->o2;
$odds['total'] = (float) $value->o3;
}
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
OddsTotalQ1::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
'total' => $odds['total'],
], $odds);
}
}
@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\OddsTq; use App\Models\OddsTq;
use App\Utilities\Margin; use App\Utilities\Margin;
use App\Utilities\Notice;
class _Tq class _Tq
{ {
public static function grap($odds, $offer) public static function grap($odds, $offer)
{ {
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// 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;
$odds['atq'] = (float) $value->o3; $odds['atq'] = (float) $value->o3;
-2
View File
@@ -20,8 +20,6 @@ class Nuh extends Command
public static $bookmaker_id; public static $bookmaker_id;
public static $AUTHTOKEN;
public static $BETSAPI_TOKEN = '36152-aeTRNnZxSPUwGe'; public static $BETSAPI_TOKEN = '36152-aeTRNnZxSPUwGe';
protected $signature = 'nuh {process=help} {--id=0} {--f=} {--a} {--p} {--d} {--b} {--w} {--g} {--r} {--s} {--t}'; protected $signature = 'nuh {process=help} {--id=0} {--f=} {--a} {--p} {--d} {--b} {--w} {--g} {--r} {--s} {--t}';
@@ -50,9 +50,9 @@ class EventsTable
public static $odds_ggng = []; public static $odds_ggng = [];
public static $odds_handicaps = []; public static $odds_points = [];
public static $odds_handicaps_q1 = []; public static $odds_points_q1 = [];
public static $odds_2ways = []; public static $odds_2ways = [];
@@ -84,10 +84,10 @@ class EventsTable
break; break;
case 8: case 8:
case 14: case 14:
self::$odds_handicaps[] = $value->bookmaker_id; self::$odds_points[] = $value->bookmaker_id;
break; break;
case 9: case 9:
self::$odds_handicaps_q1[] = $value->bookmaker_id; self::$odds_points_q1[] = $value->bookmaker_id;
break; break;
case 7: case 7:
case 12: case 12:
@@ -2,7 +2,6 @@
namespace App\Filament\Resources\Supervisors\Schemas; namespace App\Filament\Resources\Supervisors\Schemas;
use App\Models\Sport;
use Filament\Forms\Components\Select; use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section; use Filament\Schemas\Components\Section;
@@ -19,12 +18,7 @@ class SupervisorForm
->required() ->required()
->preload(), ->preload(),
Select::make('sport_id') Select::make('sport_id')
->options(function () { ->relationship('sport', 'name')
$res = Sport::where('is_active', 1)->pluck('name', 'id')->toArray();
array_unshift($res, 'All');
return $res;
})
->nullable(), ->nullable(),
TextInput::make('sleep')->default(15), TextInput::make('sleep')->default(15),
@@ -20,7 +20,7 @@ class SupervisorsTable
return $table return $table
->striped() ->striped()
->columns([ ->columns([
TextColumn::make('id')->badge(), TextColumn::make('id')->badge()->alignCenter(),
TextColumn::make('provider.name')->badge() TextColumn::make('provider.name')->badge()
->color(fn ($record): string => match ($record->provider_id) { ->color(fn ($record): string => match ($record->provider_id) {
1 => 'danger', 1 => 'danger',
@@ -36,7 +36,7 @@ class SupervisorsTable
'Bet365' => 'Bet365', 'Bet365' => 'Bet365',
'Betfair' => 'Betfair', 'Betfair' => 'Betfair',
]), ]),
TextColumn::make('sport.name')->label('Sport')->color(fn ($record): string => $record->sport->color), TextColumn::make('sport.name')->label('Sport'),
TextColumn::make('days_from')->label('From'), TextColumn::make('days_from')->label('From'),
TextColumn::make('days_to')->label('To'), TextColumn::make('days_to')->label('To'),
TextColumn::make('sleep')->numeric(), TextColumn::make('sleep')->numeric(),
+4 -4
View File
@@ -98,14 +98,14 @@ class Event extends Model
return $this->hasMany(OddsGgng::class); return $this->hasMany(OddsGgng::class);
} }
public function odds_handicap() public function odds_point()
{ {
return $this->hasMany(OddsHandicap::class); return $this->hasMany(OddsPoint::class);
} }
public function odds_handicap_q1() public function odds_point_q1()
{ {
return $this->hasMany(OddsHandicapQ1::class); return $this->hasMany(OddsPointQ1::class);
} }
public function odds_total() public function odds_total()
+1
View File
@@ -23,6 +23,7 @@ class Odds2way extends Model
'nuh_check', 'nuh_check',
'add_time', 'add_time',
'updated_at', 'updated_at',
'starttime',
]; ];
public function sport() public function sport()
+1
View File
@@ -22,6 +22,7 @@ class Odds3way extends Model
'margin', 'margin',
'flag', 'flag',
'nuh_check', 'nuh_check',
'starttime',
'add_time', 'add_time',
'updated_at', 'updated_at',
]; ];
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Odds3wayHt extends Model
{
protected $table = 'odds_3ways';
protected $fillable = [
'id',
'event_id',
'sport_id',
'bookmaker_id',
'provider_id',
'offer_id',
'bmoid',
'h3w',
'd3w',
'a3w',
'margin',
'flag',
'nuh_check',
'add_time',
'updated_at',
];
public function event()
{
return $this->belongsTo(Event::class);
}
public function sport()
{
return $this->belongsTo(Sport::class);
}
public function bookmaker()
{
return $this->belongsTo(Bookmaker::class);
}
public function provider()
{
return $this->belongsTo(Provider::class);
}
}
+2 -2
View File
@@ -4,9 +4,9 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class OddsHandicapQ1 extends Model class OddsPointQ1 extends Model
{ {
protected $table = 'odds_handicaps_q1'; protected $table = 'odds_points_q1';
protected $fillable = [ protected $fillable = [
'id', 'id',
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class OddsPoint extends Model
{
protected $table = 'odds_points';
protected $fillable = [
'id',
'event_id',
'sport_id',
'bookmaker_id',
'provider_id',
'offer_id',
'bmoid',
'home',
'away',
'handicap',
'margin',
'flag',
'nuh_check',
'add_time',
'updated_at',
'starttime',
];
public function sport()
{
return $this->belongsTo(Sport::class);
}
public function bookmaker()
{
return $this->belongsTo(Bookmaker::class);
}
public function event()
{
return $this->belongsTo(Event::class);
}
public function provider()
{
return $this->belongsTo(Provider::class);
}
}
@@ -4,9 +4,9 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class OddsHandicap extends Model class OddsPointHt extends Model
{ {
protected $table = 'odds_handicaps'; protected $table = 'odds_points';
protected $fillable = [ protected $fillable = [
'id', 'id',
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class OddsTotalHt extends Model
{
protected $table = 'odds_totals';
protected $fillable = [
'id',
'event_id',
'sport_id',
'bookmaker_id',
'provider_id',
'offer_id',
'bmoid',
'over',
'under',
'total',
'margin',
'flag',
'nuh_check',
'add_time',
'updated_at',
];
public function sport()
{
return $this->belongsTo(Sport::class);
}
public function bookmaker()
{
return $this->belongsTo(Bookmaker::class);
}
public function event()
{
return $this->belongsTo(Event::class);
}
public function provider()
{
return $this->belongsTo(Provider::class);
}
}
+1 -5
View File
@@ -21,13 +21,9 @@ class Supervisor extends Model
'days_to', 'days_to',
]; ];
protected $casts = [
'grap_days_pattern' => 'json',
];
public function sport() public function sport()
{ {
return $this->belongsTo(Sport::class); return $this->belongsTo(Sport::class)->where('is_active', 1);
} }
public function provider() public function provider()
Generated
+4 -4
View File
@@ -12890,12 +12890,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/webmozarts/assert.git", "url": "https://github.com/webmozarts/assert.git",
"reference": "b01be90dceff69c88c7b36c30ee45c9fd9107f7f" "reference": "bdbabc199a7ba9965484e4725d66170e5711323b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/b01be90dceff69c88c7b36c30ee45c9fd9107f7f", "url": "https://api.github.com/repos/webmozarts/assert/zipball/bdbabc199a7ba9965484e4725d66170e5711323b",
"reference": "b01be90dceff69c88c7b36c30ee45c9fd9107f7f", "reference": "bdbabc199a7ba9965484e4725d66170e5711323b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -12944,7 +12944,7 @@
"issues": "https://github.com/webmozarts/assert/issues", "issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/2.1.1" "source": "https://github.com/webmozarts/assert/tree/2.1.1"
}, },
"time": "2026-01-07T17:26:38+00:00" "time": "2026-01-08T11:28:40+00:00"
} }
], ],
"aliases": [], "aliases": [],
@@ -15,10 +15,12 @@ return new class extends Migration
$table->id(); $table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events'); $table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers'); $table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
$table->timestamp('bkm_starttime')->nullable();
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->boolean('in_feed')->default(0); $table->boolean('in_feed')->default(0);
$table->boolean('send_status')->default(0); $table->boolean('send_status')->default(0);
$table->timestamp('bkm_starttime')->nullable(); $table->boolean('has_to_qualify')->index()->default(0);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -14,8 +14,8 @@ return new class extends Migration
Schema::create('supervisors', function (Blueprint $table) { Schema::create('supervisors', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('name'); $table->string('name');
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->references('id')->on('providers');
$table->integer('sport_id')->index()->references('id')->on('sports'); $table->integer('sport_id')->references('id')->on('sports');
$table->integer('sleep')->default(10); $table->integer('sleep')->default(10);
$table->integer('limit')->default(0); $table->integer('limit')->default(0);
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('odds3way_hts', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable();
$table->decimal('h3w', 7, 3)->default(0);
$table->decimal('d3w', 7, 3)->default(0);
$table->decimal('a3w', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0);
$table->boolean('flag')->default(0);
$table->boolean('nuh_check')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('odds3way_hts');
}
};
@@ -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('starttime')->nullable();
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -24,6 +24,7 @@ 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('starttime')->nullable();
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -11,7 +11,7 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('odds_handicaps', function (Blueprint $table) { Schema::create('odds_points_q1', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events'); $table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('sport_id')->index()->references('id')->on('sports'); $table->integer('sport_id')->index()->references('id')->on('sports');
@@ -23,6 +23,7 @@ return new class extends Migration
$table->decimal('away', 7, 3)->default(0); $table->decimal('away', 7, 3)->default(0);
$table->decimal('handicap', 7, 3)->default(0); $table->decimal('handicap', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->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('starttime')->nullable(); $table->timestamp('starttime')->nullable();
@@ -35,6 +36,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('odds_handicaps'); Schema::dropIfExists('odds_q1_points');
} }
}; };
@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('odds_points', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable();
$table->decimal('home', 7, 3)->default(0);
$table->decimal('away', 7, 3)->default(0);
$table->decimal('handicap', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0);
$table->boolean('flag')->default(0);
$table->boolean('nuh_check')->default(0);
$table->timestamp('starttime')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('odds_points');
}
};
@@ -11,7 +11,7 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('odds_handicaps_q1', function (Blueprint $table) { Schema::create('odds_point_ht', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events'); $table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('sport_id')->index()->references('id')->on('sports'); $table->integer('sport_id')->index()->references('id')->on('sports');
@@ -23,6 +23,7 @@ return new class extends Migration
$table->decimal('away', 7, 3)->default(0); $table->decimal('away', 7, 3)->default(0);
$table->decimal('handicap', 7, 3)->default(0); $table->decimal('handicap', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->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->timestamps(); $table->timestamps();
@@ -34,6 +35,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('odds_handicaps_q1'); Schema::dropIfExists('odds_point_ht');
} }
}; };
@@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('odds_total_hts', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable();
$table->decimal('over', 7, 3)->default(0);
$table->decimal('under', 7, 3)->default(0);
$table->decimal('total', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0);
$table->boolean('flag')->default(0);
$table->boolean('nuh_check')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('odds_total_hts');
}
};
@@ -23,6 +23,7 @@ return new class extends Migration
$table->decimal('under', 7, 3)->default(0); $table->decimal('under', 7, 3)->default(0);
$table->decimal('total', 7, 3)->default(0); $table->decimal('total', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->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->timestamps(); $table->timestamps();
@@ -24,6 +24,7 @@ return new class extends Migration
$table->decimal('total', 7, 3)->default(0); $table->decimal('total', 7, 3)->default(0);
$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->decimal('difference', 5, 4)->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamps(); $table->timestamps();
}); });
@@ -13,7 +13,7 @@ return new class extends Migration
{ {
Schema::create('multiline_settings', function (Blueprint $table) { Schema::create('multiline_settings', function (Blueprint $table) {
$table->id(); $table->id();
$table->integer('sport_id')->index()->references('id')->on('sports'); $table->integer('sport_id')->references('id')->on('sports');
$table->string('name'); $table->string('name');
$table->string('short'); $table->string('short');
$table->string('table'); $table->string('table');
+3 -3
View File
@@ -21,13 +21,13 @@ class MultilineSettingSeeder extends Seeder
(5, 1, 'TO QUALIFY', 'TQ', 'odds_tq', 4, 0, '2025-12-14 09:32:19', '2025-12-14 09:32:19'), (5, 1, 'TO QUALIFY', 'TQ', 'odds_tq', 4, 0, '2025-12-14 09:32:19', '2025-12-14 09:32:19'),
(6, 1, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:32:38', '2025-12-14 09:32:38'), (6, 1, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:32:38', '2025-12-14 09:32:38'),
(7, 3, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:37:32', '2025-12-14 09:37:32'), (7, 3, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:37:32', '2025-12-14 09:37:32'),
(8, 3, 'HANDICAP', 'HC', 'odds_handicaps', 4, 1, '2025-12-14 09:38:05', '2025-12-14 09:38:05'), (8, 3, 'HANDICAP', 'HC', 'odds_points', 4, 1, '2025-12-14 09:38:05', '2025-12-14 09:38:05'),
(9, 3, 'HANDICAP FIRST QUARTER', 'HCQ1', 'odds_handicaps_q1', 4, 1, '2025-12-14 09:38:26', '2025-12-14 09:39:54'), (9, 3, 'HANDICAP FIRST QUARTER', 'HCQ1', 'odds_points_q1', 4, 1, '2025-12-14 09:38:26', '2025-12-14 09:39:54'),
(10, 3, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:38:44', '2025-12-14 09:38:44'), (10, 3, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:38:44', '2025-12-14 09:38:44'),
(11, 3, 'TOTALS FIRST QUARTER', 'OUQ1', 'odds_totals_q1', 4, 1, '2025-12-14 09:39:12', '2025-12-14 09:39:59'), (11, 3, 'TOTALS FIRST QUARTER', 'OUQ1', 'odds_totals_q1', 4, 1, '2025-12-14 09:39:12', '2025-12-14 09:39:59'),
(12, 2, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:41:21', '2025-12-14 09:41:21'), (12, 2, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:41:21', '2025-12-14 09:41:21'),
(13, 2, '1X2', '1X2', 'odds_3ways', 4, 1, '2025-12-14 09:41:34', '2025-12-14 09:41:34'), (13, 2, '1X2', '1X2', 'odds_3ways', 4, 1, '2025-12-14 09:41:34', '2025-12-14 09:41:34'),
(14, 2, 'HANDICAP', 'HC', 'odds_handicaps', 4, 1, '2025-12-14 09:41:56', '2025-12-14 09:41:56'), (14, 2, 'HANDICAP', 'HC', 'odds_points', 4, 1, '2025-12-14 09:41:56', '2025-12-14 09:41:56'),
(15, 2, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:42:13', '2025-12-14 09:42:13'), (15, 2, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:42:13', '2025-12-14 09:42:13'),
(16, 5, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:43:52', '2025-12-14 09:43:52'), (16, 5, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:43:52', '2025-12-14 09:43:52'),
(17, 5, 'MONEY LINE SET 1', 'MLS1', 'odds_2ways_s1', 4, 0, '2025-12-14 09:44:13', '2025-12-14 09:44:13'), (17, 5, 'MONEY LINE SET 1', 'MLS1', 'odds_2ways_s1', 4, 0, '2025-12-14 09:44:13', '2025-12-14 09:44:13'),
+5 -2
View File
@@ -15,7 +15,7 @@ class SupervisorSeeder extends Seeder
$sql = "INSERT INTO `supervisors` (`id`, `name`, `provider_id`, `sport_id`, `sleep`, `limit`, `runtime`, `maxsconds`, `lastcall`, `is_cron`, `is_active`, `days_from`, `days_to`, `created_at`, `updated_at`) $sql = "INSERT INTO `supervisors` (`id`, `name`, `provider_id`, `sport_id`, `sleep`, `limit`, `runtime`, `maxsconds`, `lastcall`, `is_cron`, `is_active`, `days_from`, `days_to`, `created_at`, `updated_at`)
VALUES VALUES
(1, 'Fixtures', 1, 1, 10, 0, '0.073', 1800, 0, 1, 1, 0, 0, '2025-08-27 07:39:55', '2026-01-08 10:23:28'), (1, 'Fixtures', 1, 1, 10, 0, '0.073', 1800, 0, 1, 1, 0, 0, '2025-08-27 07:39:55', '2026-01-08 10:23:28'),
(2, 'Odds', 1, 1, 10, 0, '0.251', 30, 0, 0, 1, 0, 0, '2025-12-01 05:41:02', '2025-12-22 05:20:40'), (2, 'Odds', 1, 1, 10, 0, '0.251', 30, 0, 0, 1, 0, 10, '2025-12-01 05:41:02', '2026-01-08 17:56:27'),
(3, 'Fixtures', 2, 0, 15, 0, '0.133', 1800, 0, 1, 1, 0, 0, '2025-12-19 11:42:35', '2026-01-08 10:25:32'), (3, 'Fixtures', 2, 0, 15, 0, '0.133', 1800, 0, 1, 1, 0, 0, '2025-12-19 11:42:35', '2026-01-08 10:25:32'),
(4, 'Willhill', 2, 0, 15, 0, '2.119', 1800, 0, 1, 1, 0, 0, '2025-12-19 11:48:05', '2026-01-04 10:27:11'), (4, 'Willhill', 2, 0, 15, 0, '2.119', 1800, 0, 1, 1, 0, 0, '2025-12-19 11:48:05', '2026-01-04 10:27:11'),
(5, 'Bwin', 2, 0, 15, 0, '0.084', 1800, 0, 1, 1, 0, 0, '2025-12-22 06:41:18', '2026-01-04 10:29:32'), (5, 'Bwin', 2, 0, 15, 0, '0.084', 1800, 0, 1, 1, 0, 0, '2025-12-22 06:41:18', '2026-01-04 10:29:32'),
@@ -32,7 +32,10 @@ class SupervisorSeeder extends Seeder
(16, 'Odds', 6, 1, 10, 0, '1.368', 30, 0, 0, 1, 0, 0, '2025-12-18 17:44:33', '2026-01-05 06:22:27'), (16, 'Odds', 6, 1, 10, 0, '1.368', 30, 0, 0, 1, 0, 0, '2025-12-18 17:44:33', '2026-01-05 06:22:27'),
(17, 'Odds', 6, 3, 15, 0, NULL, 1800, 0, 0, 1, 0, 0, '2026-01-03 12:27:44', '2026-01-05 06:22:37'), (17, 'Odds', 6, 3, 15, 0, NULL, 1800, 0, 0, 1, 0, 0, '2026-01-03 12:27:44', '2026-01-05 06:22:37'),
(18, 'Odds', 6, 2, 10, 0, '1.368', 30, 0, 0, 1, 0, 0, '2025-12-18 17:44:33', '2026-01-05 06:22:51'), (18, 'Odds', 6, 2, 10, 0, '1.368', 30, 0, 0, 1, 0, 0, '2025-12-18 17:44:33', '2026-01-05 06:22:51'),
(19, 'Odds', 6, 5, 15, 0, NULL, 1800, 0, 0, 1, 0, 0, '2026-01-03 12:27:44', '2026-01-03 12:27:53'); (19, 'Odds', 6, 5, 15, 0, NULL, 1800, 0, 0, 1, 0, 0, '2026-01-03 12:27:44', '2026-01-03 12:27:53'),
(20, 'Odds', 1, 3, 15, 0, NULL, 1800, 0, 0, 0, 0, 10, '2026-01-08 17:56:50', '2026-01-08 17:56:55'),
(21, 'Odds', 1, 2, 15, 0, NULL, 1800, 0, 0, 0, 0, 10, '2026-01-08 17:57:14', '2026-01-08 17:57:50'),
(22, 'Odds', 1, 5, 15, 0, NULL, 1800, 0, 0, 0, 0, 10, '2026-01-08 17:57:24', '2026-01-08 17:57:52');
"; ";
DB::unprepared($sql); DB::unprepared($sql);
} }