<?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('body_measurements', function (Blueprint $table) {
            $table->id();
            $table->foreignId('assessment_id')->unique()->constrained('athlete_assessments')->cascadeOnDelete();

            $table->decimal('waist_cm', 5, 1)->nullable();  // دور کمر
            $table->decimal('arm_cm', 5, 1)->nullable();    // دور بازو
            $table->decimal('thigh_cm', 5, 1)->nullable();  // دور ران
            $table->decimal('chest_cm', 5, 1)->nullable();  // دور قفسه سینه

            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('body_measurements');
    }
};
