<?php

namespace App\Console\Commands;

use App\Support\OfferCurator;
use Illuminate\Console\Command;

class CurateOffers extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'offers:curate';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Re-score provider offers and campaigns and refresh their hot/featured flags';

    public function handle(OfferCurator $curator)
    {
        $summary = $curator->curate();

        $this->info("Curation complete: {$summary['hot']} marked hot, {$summary['featured']} marked featured, {$summary['cleared']} cleared.");

        return 0;
    }
}
