added yoga stuff, i18n, workout tracking and a dashboard to track progress

This commit is contained in:
2025-10-04 17:55:30 +03:00
parent 1ed9235451
commit d1bc362fab
32 changed files with 1790 additions and 63 deletions
@@ -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('workout_sessions', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->foreignId('workout_id')->constrained()->cascadeOnDelete();
$table->timestamp('started_at')->nullable();
$table->timestamp('completed_at')->nullable();
$table->timestamps();
$table->index(['user_id', 'workout_id']);
});
}
public function down(): void
{
Schema::dropIfExists('workout_sessions');
}
};
@@ -0,0 +1,25 @@
<?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('workout_session_items', function (Blueprint $table) {
$table->id();
$table->foreignId('session_id')->constrained('workout_sessions')->cascadeOnDelete();
$table->foreignId('workout_exercise_id')->constrained()->cascadeOnDelete();
$table->boolean('done')->default(false);
$table->timestamps();
$table->unique(['session_id', 'workout_exercise_id']);
});
}
public function down(): void
{
Schema::dropIfExists('workout_session_items');
}
};
@@ -0,0 +1,23 @@
<?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('yoga_categories', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('external_id')->unique();
$table->string('name');
$table->text('description')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('yoga_categories');
}
};
@@ -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 {
public function up(): void
{
Schema::create('yoga_poses', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('external_id')->unique();
$table->foreignId('category_id')->constrained('yoga_categories')->cascadeOnDelete();
$table->string('slug')->unique();
$table->string('english_name');
$table->string('sanskrit_name_adapted')->nullable();
$table->string('sanskrit_name')->nullable();
$table->string('translation_name')->nullable();
$table->text('description')->nullable();
$table->text('benefits')->nullable();
$table->string('url_svg')->nullable();
$table->string('url_png')->nullable();
$table->string('url_svg_alt')->nullable();
$table->timestamps();
$table->index(['category_id']);
});
}
public function down(): void
{
Schema::dropIfExists('yoga_poses');
}
};