<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('message_apis', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id');
            $table->integer('operator_id')->default(0);
            $table->string('title');
            $table->string('username');
            $table->float('sms_rates');
            $table->string('password');
            $table->string('billMsisdn');
            $table->integer('sender_id_type')->comment('1=non_masking, 0=masking');
            $table->string('apiKey');
            $table->string('cli');
            $table->string('transactionType');
            $table->string('messageType');
            $table->string('campaignId');
            $table->string('details');
            $table->text('image')->nullable();
            $table->integer('type')->default(1)->comment('0=All, 1=Specific');
            $table->integer('status')->default(1)->comment('1=Active, 0=InActive');
            $table->timestamps();
        });
    }

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