<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('construction_types', function (Blueprint $table) {
            $table->increments('ConsTy_Id');
            $table->string('ConsTy_Code', 20)->unique();
            $table->string('ConsTy_Name', 100);
            $table->decimal('Str_Factor', 5, 2)
                  ->default(1.00)
                  ->comment('Structure factor for tax calculation');

            $table->timestamps();
            $table->softDeletes();
        });
    }

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