<?php

namespace App\Jobs;

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Artisan;

class PropertyReviewAnalyzeServiceJob implements ShouldQueue
{
    use InteractsWithQueue;

    protected $reviewId;

    /**
     * Create a new job instance.
     */
    public function __construct($reviewId)
    {
        $this->reviewId = $reviewId;
    }

    /**
     * Execute the job.
     */
    public function handle()
    {
        Artisan::call('cron:property-review-analyze-service', [
            'review_id' => $this->reviewId,
        ]);
    }
}
