<?php

namespace App\Listeners;

use App\Jobs\GrowingIO\EachLikeReportJob;
use App\Jobs\GrowingIO\FeedEachLikeReportJob;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;

class EachLikeReport
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle($event)
    {
        //
        $userId = $event->uid;
        $likeUserId = $event->isLikeUid;
        EachLikeReportJob::dispatch($userId, $likeUserId, 1);
        EachLikeReportJob::dispatch($likeUserId, $userId, 0);
    }
}
