<?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('profiles', function (Blueprint $table) {
            $table->id();
            $table->string('profile_id', 10)->unique();
            $table->foreignId('user_id')->constrained()->onDelete('cascade');
            $table->string('display_name', 50)->unique();
            $table->string('avatar')->nullable();
            $table->string('pronouns', 50)->nullable();
            $table->text('bio')->nullable();
            
            // Social media links
            $table->string('twitter')->nullable();
            $table->string('instagram')->nullable();
            $table->string('youtube')->nullable();
            $table->string('discord', 100)->nullable();
            
            // Ride statistics
            $table->integer('coaster_credits')->default(0);
            $table->integer('dark_ride_credits')->default(0);
            $table->integer('flat_ride_credits')->default(0);
            $table->integer('water_ride_credits')->default(0);
            
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('profiles');
    }
};