<?php

namespace App\Console\Commands\Competitions;

use App\Facades\TedImportService;
use Illuminate\Console\Command;

class ImportFromTed extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'competitions:import-from-ted';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Import the most recent competitions from TED';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        TedImportService::import();
        return 0;
    }
}
