<?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('company_coupons', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('company_id')->index();
            $table->bigInteger('coupon_subscription_rates_id')->index();
            $table->boolean('is_active');
            $table->integer('company_usage');
            $table->integer('range')->comment('Hard copy of coupon range');
            $table->timestamp('activated_at');
            $table->timestamps();
        });
    }

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