<?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('people_messages', function (Blueprint $table) {
            $table->id();
            $table->string('caller_phone_number');
            $table->dateTime('date');
            $table->string('voice');
            $table->integer('review_duration')->nullable();
            $table->dateTime('listen_at')->nullable();
            $table->boolean('is_listen')->default(false);
            $table->foreignId('action_id')->nullable()->constrained('people_message_actions');
            $table->string('action_name')->nullable();
            $table->string('description')->nullable();
            $table->unsignedBigInteger('savaneh_id')->nullable();
            $table->timestamps();
        });
    }

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