<?php
/**
 * Created by PhpStorm.
 * User: sunil
 * Date: 9/29/18
 * Time: 4:30 PM
 */

namespace App\Console\Commands;


use App\ConsumerApplication;
use App\EmiPayment;
use App\Http\Controllers\Admin\AccountingController;
use App\Http\Controllers\Admin\ConsumerApplicationController;
use App\Http\Controllers\Admin\EMICalculation;
use App\Jobs;
use App\LoanManagement;
use App\Services;
use App\Slack;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Http\Request;

class LoanDefault extends Command
{

    protected $signature = 'loan:default {--bucket=}';


    public function __construct(){
        parent::__construct();
    }


    public function handle(){
        (new Slack(new Request(['title' => 'Loan Default Started 1'  , 'fields' => ['Date' => date('y-m-d H:i:s')], 'group' => Slack::$STAGE_TESTING])))->send();
        $loanManagement = new AccountingController();
        $loanManagement->getDPDReport(new Request(['internal' => true, 'is_queue' => true, 'data_type' => 1]));
        (new Slack(new Request(['title' => 'Loan Default End 1' , 'fields' => ['Date' => date('y-m-d H:i:s')], 'group' => Slack::$STAGE_TESTING])))->send();

        /*(new Slack(new Request(['title' => 'Loan Default Started 2' , 'fields' => ['Date' => date('y-m-d H:i:s')], 'group' => Slack::$STAGE_TESTING])))->send();
        $loanManagement = new AccountingController();
        $loanManagement->getDPDReport(new Request(['internal' => true, 'is_queue' => true, 'data_type' => 2]));
        (new Slack(new Request(['title' => 'Loan Default End 2' , 'fields' => ['Date' => date('y-m-d H:i:s')], 'group' => Slack::$STAGE_TESTING])))->send();*/
    }
}