<?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_plans', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id');
            $table->string('name');
            $table->string('name_ar');
            $table->string('type');
            $table->string('price');
            $table->string('currency');
            $table->string('description');
            $table->string('description_ar');
            $table->enum('status', [0, 1])->default(1);
            $table->string('payment_method')->nullable();
            $table->string('total_price')->nullable();
            $table->string('discount')->nullable();
            $table->string('promo_code')->nullable();
            $table->unsignedBigInteger('payment_id')->nullable();
            $table->timestamps();
        });
    }

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