notification messages wip
This commit is contained in:
1 parent
98d92b2ee3
commit
3ad02457f1
9 files changed
+150
-23
No files matched your search
@@ -18,6 +18,10 @@ return new class extends Migration
|
||||
$table->boolean(column: 'has_active_spread')->default(0);
|
||||
$table->string('oddnames');
|
||||
$table->string('fieldnames');
|
||||
$table->boolean('soccer')->default(false);
|
||||
$table->boolean('icehockey')->default(false);
|
||||
$table->boolean('basketball')->default(false);
|
||||
$table->boolean('tennis')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('messages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('bookmaker_id')->default(0);
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->string('message');
|
||||
$table->integer('deleted')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('messages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('user_notifications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('bookmaker_id')->default(0);
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->integer('odds_table_id')->index()->references('id')->on('odds_tables');
|
||||
$table->integer('alarm_level_id')->default(0);
|
||||
$table->string('message');
|
||||
$table->integer('deleted')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_notifications');
|
||||
}
|
||||
};
|
||||
@@ -12,22 +12,22 @@ class OddsTableSeeder extends Seeder
|
||||
/**
|
||||
* Provoider
|
||||
*/
|
||||
$sql = "INSERT INTO `odds_tables` (`id`, `name`, `title`, `oddnames`, `fieldnames`, `has_active_spread`, `created_at`, `updated_at`)
|
||||
$sql = "INSERT INTO `odds_tables` (`id`, `name`, `title`, `oddnames`, `fieldnames`, `has_active_spread`, `soccer`, `icehockey`, `basketball`, `tennis`, `created_at`, `updated_at`)
|
||||
VALUES
|
||||
(1, 'odds_2ways', 'ML', 'h2w,a2w', 'alarm_2w_h2w,alarm_2w_a2w', 0, NULL, NULL),
|
||||
(2, 'odds_2ways_s1', 'ML S1', 'h2w,a2w', 'alarm_2ws1_h2w,alarm_2ws1_a2w', 0, NULL, NULL),
|
||||
(3, 'odds_3ways', '1X2', 'h3w,d3w,a3w', 'alarm_3w_h3w,alarm_3w_d3w,alarm_3w_a3w', 0, NULL, NULL),
|
||||
(4, 'odds_3ways_ht', '1X2 HT', 'h3w,d3w,a3w', 'alarm_3wht_h3w,alarm_3wht_d3w,alarm_3wht_a3w', 0, NULL, NULL),
|
||||
(5, 'odds_dc', 'DC', 'dc1x,dc12,dcx2', 'alarm_dc_dc1x,alarm_dc_dc12,alarm_dc_dcx2', 0, NULL, NULL),
|
||||
(6, 'odds_dnb', 'DNB', 'dnb1,dnb2', 'alarm_dbn_dnb1,alarm_dbn_dnb2', 0, NULL, NULL),
|
||||
(7, 'odds_ggng', 'GGNG', 'gg,ng', 'alarm_ggng_gg,alarm_ggng_ng', 0, NULL, NULL),
|
||||
(8, 'odds_points', 'PO', 'home,away', 'alarm_po_home,alarm_po_away', 1, NULL, NULL),
|
||||
(9, 'odds_points_ht', 'PO HT', 'home,away', 'alarm_poht_home,alarm_poht_away', 1, NULL, NULL),
|
||||
(10, 'odds_points_q1', 'PO Q1', 'home,away', 'alarm_poq1_home,alarm_poq1_away', 1, NULL, NULL),
|
||||
(11, 'odds_totals', 'TO', 'over,under', 'alarm_to_over,alarm_to_under', 1, NULL, NULL),
|
||||
(12, 'odds_totals_ht', 'TO HT', 'over,under', 'alarm_toht_over,alarm_toht_under', 1, NULL, NULL),
|
||||
(13, 'odds_totals_q1', 'TO Q1', 'over,under', 'alarm_toq1_over,alarm_toq1_under', 1, NULL, NULL),
|
||||
(14, 'odds_tq', 'TQ', 'htq,atq', 'alarm_tq_htq,alarm_tq_atq', 1, NULL, NULL);
|
||||
(1, 'odds_2ways', 'ML', 'h2w,a2w', 'alarm_2w_h2w,alarm_2w_a2w', 0, 0, 1, 1, 1, NULL, NULL),
|
||||
(2, 'odds_2ways_s1', 'ML S1', 'h2w,a2w', 'alarm_2ws1_h2w,alarm_2ws1_a2w', 0, 0, 0, 0, 1, NULL, NULL),
|
||||
(3, 'odds_3ways', '1X2', 'h3w,d3w,a3w', 'alarm_3w_h3w,alarm_3w_d3w,alarm_3w_a3w', 0, 1, 1, 0, 0, NULL, NULL),
|
||||
(4, 'odds_3ways_ht', '1X2 HT', 'h3w,d3w,a3w', 'alarm_3wht_h3w,alarm_3wht_d3w,alarm_3wht_a3w', 0, 1, 0, 0, 0, NULL, NULL),
|
||||
(5, 'odds_dc', 'DC', 'dc1x,dc12,dcx2', 'alarm_dc_dc1x,alarm_dc_dc12,alarm_dc_dcx2', 0, 1, 0, 0, 0, NULL, NULL),
|
||||
(6, 'odds_dnb', 'DNB', 'dnb1,dnb2', 'alarm_dbn_dnb1,alarm_dbn_dnb2', 0, 1, 0, 0, 0, NULL, NULL),
|
||||
(7, 'odds_ggng', 'GGNG', 'gg,ng', 'alarm_ggng_gg,alarm_ggng_ng', 0, 1, 0, 0, 0, NULL, NULL),
|
||||
(8, 'odds_points', 'PO', 'home,away', 'alarm_po_home,alarm_po_away', 1, 0, 1, 1, 1, NULL, NULL),
|
||||
(9, 'odds_points_ht', 'PO HT', 'home,away', 'alarm_poht_home,alarm_poht_away', 1, 0, 0, 1, 0, NULL, NULL),
|
||||
(10, 'odds_points_q1', 'PO Q1', 'home,away', 'alarm_poq1_home,alarm_poq1_away', 1, 0, 1, 1, 0, NULL, NULL),
|
||||
(11, 'odds_totals', 'TO', 'over,under', 'alarm_to_over,alarm_to_under', 1, 1, 1, 1, 1, NULL, NULL),
|
||||
(12, 'odds_totals_ht', 'TO HT', 'over,under', 'alarm_toht_over,alarm_toht_under', 1, 1, 0, 1, 0, NULL, NULL),
|
||||
(13, 'odds_totals_q1', 'TO Q1', 'over,under', 'alarm_toq1_over,alarm_toq1_under', 1, 0, 1, 1, 0, NULL, NULL),
|
||||
(14, 'odds_tq', 'TQ', 'htq,atq', 'alarm_tq_htq,alarm_tq_atq', 1, 1, 0, 0, 0, NULL, NULL);
|
||||
";
|
||||
DB::unprepared($sql);
|
||||
|
||||
|
||||
Reference in new issue
Block a user