<?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('media_monitorings', function (Blueprint $table) {
            $table->id();
            $table->string('code', 10);
            $table->string('media_name', 50);
            $table->text('title', 255);
            $table->string('channel', 20);
            $table->string('writter', 50);
            $table->text('link', 50)->nullable();
            $table->string('news_page', 20)->nullable();
            $table->text('quote')->nullable();
            $table->text('content');
            $table->string('influencer', 50)->nullable();
            $table->string('keyword', 100);
            $table->date('release_date');
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
            $table->softDeletes();
        });
    }

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