update the match view

This commit is contained in:
ghassan committed 2026-03-12 03:59:52 +03:00
1 parent 062c0e896f
commit 69f5df163a
14 files changed
+7331 -743

No files matched your search

@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('match_rounds', function (Blueprint $table) {
$table->id();
$table->foreignId('video_id')->constrained()->onDelete('cascade');
$table->integer('round_number');
$table->string('name')->default('ROUND');
$table->timestamps();
$table->unique(['video_id', 'round_number']);
});
}
public function down(): void
{
Schema::dropIfExists('match_rounds');
}
};
@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('match_points', function (Blueprint $table) {
$table->id();
$table->foreignId('video_id')->constrained()->onDelete('cascade');
$table->foreignId('match_round_id')->constrained('match_rounds')->onDelete('cascade');
$table->integer('timestamp_seconds');
$table->string('action');
$table->integer('points');
$table->string('competitor'); // 'blue' or 'red'
$table->string('notes')->nullable();
$table->integer('score_blue')->default(0);
$table->integer('score_red')->default(0);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('match_points');
}
};
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('coach_reviews', function (Blueprint $table) {
$table->id();
$table->foreignId('video_id')->constrained()->onDelete('cascade');
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->integer('start_time_seconds');
$table->integer('end_time_seconds')->nullable();
$table->text('note');
$table->string('coach_name');
$table->string('emoji')->default('🔥');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('coach_reviews');
}
};