<?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('manage_contact_us', function (Blueprint $table) {
           
           
            $table->id();
          
            $table->unsignedBigInteger('principal_xid');
            $table->string('name', 60)->nullable();
            $table->string('email', 100)->nullable();
            $table->longText('message')->nullable();
            $table->boolean('is_reply')->default(false);
            $table->longText('reply_message')->nullable();
           
            $table->softDeletes();
            $table->foreign('principal_xid')->references('id')->on('iam_principal')->onDelete('cascade');
            $table->timestamps(); 
            $table->boolean('is_active')->default(1)->comment('1=Active, 0=Deactive');
            $table->integer('created_by')->nullable();
            $table->integer('modified_by')->nullable();
           


            
        });
    }

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