<?php

namespace App\Console\Commands;

use App\Models\Client;
use Illuminate\Console\Command;

class AllActiveCustomerCRMStatusMarketingCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'crm-status:marketing';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

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

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        Client::where('clients_status', 'active')
                ->orWhere('clients_status', 'disable')
                ->update([
                    'crm_status' => 'Marketing',
                    'crm_check_date' => null,
                ]);


    }
}
