<?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('histories', function (Blueprint $table) {
            $table->id();
            $table->string('selected_year')->comment("年份");
            $table->string('selected_month')->comment("月份");
            $table->dateTime('operate_date')->nullable()->comment("日期 暫時用不到 預留可能以後需要");
            $table->json('title')->comment("標題");
            $table->string('img_url')->nullable()->comment("圖片");
            $table->json('img_alt')->nullable()->comment("圖片註釋");
            $table->boolean('visible')->default(1)->comment("顯示/隱藏");
            $table->timestamps();
            $table->softDeletes();
        });
    }

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