<?php

namespace App\Providers;

use App\Events\BusinessOrdersUpdate;
use App\Events\StockUpdateEvent;
use App\Events\GroupSetEvent;
use App\Events\BatchStockUpdateEvent;
use App\Listeners\BatchStockUpdateListener;
use App\Listeners\CreateLogisticListener;
use App\Listeners\GroupQueryListener;
use App\Listeners\StockUpdateListener;
use App\Listeners\CombinationGoodsStockUpdateListener;
use App\Listeners\UpdateBusinessGoodsStock;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use App\Events\BusinessOrderCancelEvent;
use App\Listeners\CancelLogisticListener;
use App\Events\CreateLogisticEvent;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        BusinessOrdersUpdate::class => [
            UpdateBusinessGoodsStock::class,
            CombinationGoodsStockUpdateListener::class,
        ],
        BatchStockUpdateEvent::class => [
            BatchStockUpdateListener::class,
            CombinationGoodsStockUpdateListener::class,
        ],
        StockUpdateEvent::class => [
            StockUpdateListener::class,
            CombinationGoodsStockUpdateListener::class,
        ],
        GroupSetEvent::class => [
            GroupQueryListener::class,
        ],
        BusinessOrderCancelEvent::class => [
            CancelLogisticListener::class
        ],
        CreateLogisticEvent::class => [
            CreateLogisticListener::class
        ],
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        //
    }
}
