added chart for displaying health metrix

This commit is contained in:
ghassan committed 2026-01-24 12:40:01 +03:00
1 parent a325919cd0
commit 87051e179d
22 files changed
+1383 -63

No files matched your search

@@ -0,0 +1,35 @@
<?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('tournament_events', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->string('title');
$table->enum('type', ['championship', 'tournament']);
$table->string('sport');
$table->date('date');
$table->time('time')->nullable();
$table->string('location')->nullable();
$table->integer('participants_count')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tournament_events');
}
};
@@ -0,0 +1,31 @@
<?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('performance_results', function (Blueprint $table) {
$table->id();
$table->foreignId('tournament_event_id')->constrained()->onDelete('cascade');
$table->text('description')->nullable();
$table->enum('medal_type', ['1st', '2nd', '3rd', 'special']);
$table->integer('points')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('performance_results');
}
};
@@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('notes_media', function (Blueprint $table) {
$table->id();
$table->foreignId('tournament_event_id')->constrained()->onDelete('cascade');
$table->text('note_text')->nullable();
$table->string('media_link')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('notes_media');
}
};
@@ -0,0 +1,38 @@
<?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('goals', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->string('title');
$table->text('description')->nullable();
$table->date('start_date');
$table->date('target_date');
$table->decimal('current_progress_value', 8, 2)->default(0);
$table->decimal('target_value', 8, 2);
$table->enum('status', ['active', 'completed'])->default('active');
$table->enum('priority_level', ['high', 'medium', 'low'])->default('medium');
$table->string('unit')->nullable(); // e.g., lbs, min, kg
$table->string('icon_type')->default('target'); // e.g., target, dumbbell, clock
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('goals');
}
};
@@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('health_records', function (Blueprint $table) {
$table->decimal('height', 5, 2)->nullable()->after('user_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('health_records', function (Blueprint $table) {
$table->dropColumn('height');
});
}
};