<?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('sponsors', function (Blueprint $table) {
            $table->id();
            $table->string('full_name');
            $table->string('email')->unique();
            $table->string('mobile');
            $table->string('password');
            $table->string('country_code')->nullable();
            
            // Subscription
            $table->string('subscription_status')->default('none'); // 'none', 'active', 'expired'
            $table->string('subscription_plan')->nullable(); // 'basic', 'premium', 'vip'
            $table->timestamp('subscription_start_date')->nullable();
            $table->timestamp('subscription_end_date')->nullable();
            $table->string('payment_status')->default('unpaid'); // 'pending', 'paid', 'unpaid'
            
            // Verification
            $table->boolean('is_verified')->default(false);
            $table->timestamp('otp_verified_at')->nullable();
            
            // Profile
            $table->string('profile_image')->nullable();
            $table->string('address')->nullable();
            $table->string('city')->nullable();
            $table->string('nationality')->nullable();
            
            // System
            $table->string('status')->default('active'); // 'active', 'inactive', 'suspended'
            $table->timestamp('last_login_at')->nullable();
            $table->timestamps();
        });
    }

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