<?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('google_ads_drafts', function (Blueprint $table) {
            $table->id();
            $table->foreignId('user_id')->constrained()->cascadeOnDelete();
            $table->string('campaign_name');
            $table->string('ad_group_name');
            $table->string('headline_1', 30);
            $table->string('headline_2', 30);
            $table->string('headline_3', 30)->nullable();
            $table->string('description_1', 90);
            $table->string('description_2', 90)->nullable();
            $table->string('final_url', 2048);
            $table->json('keywords');
            $table->decimal('daily_budget', 12, 2);
            $table->string('status')->default('draft');
            $table->timestamps();
        });
    }

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