<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('block_depreciation', function (Blueprint $table) {
            $table->id();
            $table->date("start_date")->nullable();
            $table->decimal("residual_value",15,2)->nullable();
            $table->string("depriciation_method",255)->nullable();
            $table->decimal("purchase_value",15,2)->nullable();
            $table->date("book_dep_start_date",)->nullable();
            $table->integer("total")->nullable();
            $table->integer("prior_year")->nullable();
            $table->integer("current_year")->nullable();
            $table->decimal("initial_allowance",15,2)->nullable();
            $table->decimal("impairement_cost",15,2)->nullable();
            $table->timestamps();
        });
    }

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