<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Danoral\Cuotas\Cuota;

class MigrarDeuda extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'deuda:migrar {dateT} {codEdif}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Migra la deuda de un edificio';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $this->info("************************************************************************");
        $codEdif = $this->argument('codEdif');
        $dateT = $this->argument('dateT');
        $this->info("Migrar Deuda: $codEdif | $dateT");

        return Cuota::migrarDeuda($codEdif, $dateT);

        //Cuota::eliminarCuotaInicial(100100020000000982);

    }
}
