<?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('property_usage_types', function (Blueprint $table) {
            $table->bigIncrements('UsgTy_Id');
            $table->string('UsgTy_Code', 20)->unique();
            $table->string('UsgTy_Name', 100);

            $table->enum('UsgTy_Category', [
                'Residential',
                'Commercial',
                'Industrial',
                'Mixed',
                'Exempt'
            ]);

            $table->decimal('Use_Factor', 5, 2)->default(1.00)
                  ->comment('Multiplier used in tax calculation');

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

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