<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

/**
 * PRC-1143 — konsolide şema: `email_marketing_lists` tablosunun TAM tanımı (tek dosya).
 */
return new class extends Migration
{
    public function up(): void
    {
        Schema::create('email_marketing_lists', function (Blueprint $t) {
            $t->id();
            $t->string('name', 255);
            $t->string('description', 255)->nullable();
            $t->string('provider', 255)->nullable();
            $t->string('remote_id', 255)->nullable();
            $t->boolean('status')->default(1);
            $t->unsignedInteger('subscribers_count')->default(0);
            $t->string('default_from_name', 255)->nullable();
            $t->string('default_from_email', 255)->nullable();
            $t->string('default_reply_to', 255)->nullable();
            $t->timestamp('created_at')->nullable();
            $t->timestamp('updated_at')->nullable();
        });
    }

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