<?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('news_articles', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('news_articles_category_xid');
            $table->foreign('news_articles_category_xid')->references('id')->on('news_article_categories');
            $table->string('name');
            $table->longText('description');
            $table->string('thumbnail_image');
            $table->string('image');
            $table->enum('is_active',['0','1'])->default(1)->comment('0 = Active, 1 = Inactive');
            $table->softDeletes();
            $table->timestamps();

        });
    }

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