<?php

namespace App\Console\Commands\V2;

use App\Classes\Jobs\Commands\V2\DeleteOrderV2CommandJob;
use App\Classes\Modules\Jobs\DataTransferObjects\DeleteOrderV2CommandObject;
use Illuminate\Console\Command;

class DeleteOrderV2Command extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'make-refunded-booking-expired-command {bookings_reference}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Change refunded booking status to expired';

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

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $deleteOrderV2CommandObject = new DeleteOrderV2CommandObject(
            $this->argument('bookings_reference')
        );
        DeleteOrderV2CommandJob::dispatch($deleteOrderV2CommandObject);
    }
}
