<?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_subscription_rates', function (Blueprint $table) {
            $table->tinyInteger('id')->autoIncrement();
            $table->string('name', 100);
            $table->longText('description');
            $table->decimal('monthly_rate', 10, 2);
            $table->decimal('yearly_rate', 10, 2);
            $table->smallInteger('max_employee')->nullable();
            $table->boolean('is_unlimited');
            $table->boolean('is_disabled')->default('0');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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