<?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('text_ads', function (Blueprint $table) {
            $table->id();
            $table->string('content')->comment('廣告內容');
            $table->enum('color', ['white', 'red', 'green','blue'])->default('white')->comment('顯示顏色'); 
            $table->integer('duration')->default(1)->comment('播放間隔時間（分鐘）');
            $table->boolean('is_active')->default(true); // 啟用狀態
            $table->timestamps();
        });
    }

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