<?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('user_profiles', function (Blueprint $table) {
            $table->id();
            $table->foreignId('user_id')->constrained()->onDelete('cascade');

            // Personal Info
            $table->string('real_name');
            $table->string('nickname');
            $table->string('phone_country_code')->nullable();
            $table->string('phone_number');
 
            // Gender and Country
            $table->enum('gender', ['male', 'female', 'others']);
            $table->string('country');

            // Profile Photo
            $table->string('profile_photo')->nullable();

            // Book Info
            $table->string('book_name');
            $table->string('author_name');
            $table->string('short_description');
            $table->string('book_cover')->nullable();
            $table->string('prfile_likes')->nullable();
             $table->string('book_likes')->nullable();
            $table->timestamps();
        });
    }

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