<?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('schedules', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id');
            $table->integer('sender_id');
            $table->date('date');
            $table->time('time');
            $table->integer('message_id');
            $table->integer('type')->default(1)->comment("1=Quick SMS, 2=Campaign SMS,3=Group SMS, 4=FileTo SMS");
            $table->bigInteger('type_id');
            $table->bigInteger('number_id');
            $table->float('rate');
            $table->integer('status')->default(1)->comment('1=Active, 0=InActive, 2=Completed');
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('schedules');
    }
};
