<?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('tax_master_subs', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('tax_master_id')->nullable();
            $table->string('name', 255)->nullable();
            $table->string('percentage', 255)->nullable();
            $table->string('calculation', 255)->nullable();
            $table->string('description', 255)->nullable();
            $table->decimal('priority')->nullable();
            $table->enum('default', ['0', '1'])->default('0');
            $table->enum('status', ['0', '1'])->default('1');
            $table->timestamps();
        });
    }

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