<?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()
{
    Schema::create('vend_tds_cnsptn_master', function (Blueprint $table) {
        $table->id('VTC_Id');
        $table->unsignedBigInteger('SL_Id');
        $table->unsignedBigInteger('FY_Id');
        $table->string('TDS_rate', 2);
        $table->text('Document')->nullable();
        $table->string('Remark')->nullable();
        $table->timestamps();

        $table->foreign('SL_Id')->references('SL_Id')->on('subledg_master')->onDelete('cascade');
        $table->foreign('FY_Id')->references('FY_Id')->on('fyear_master')->onDelete('cascade');
    });
}

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