<?php

namespace App\Providers;

use App\Events\ModelChangedEvent;
use App\Listeners\ModelChangedListener;
use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        'App\Events\WaybillPriceModelEvent' => [
            'App\Listeners\WaybillPriceModelListener',
        ],
        'App\Events\WmsReceiveNewEvent' => [
            'App\Listeners\WmsReceiveNewListener',
        ],
        'App\Events\InformWMSReceivedEvent' => [
            'App\Listeners\InformWMSReceivedListener',
        ],
        'App\Events\ResetProcessStatisticStartDateEvent' =>[
            'App\Listeners\ResetProcessStatisticStartDateListener'
        ],
        ModelChangedEvent::class =>[
            ModelChangedListener::class
        ],
        'App\Events\SendEmailEvent' => [
            'App\Listeners\SendEmailListener'
        ],
        'App\Events\AddOrUpdateOrderIssues' => [//问题件新增或更新
            'App\Listeners\AddOrUpdateOrderIssuesListener',//将对应的order_packages的数据的异常装变更
        ],
        'App\Events\OrderIssueProcessLogCreateEvent' => [//orderIssue增添日志时
            'App\Listeners\UpdateOrderPackageExceptionListener',//将对应的order_packages的数据的异常装变更为无
        ],
        'App\Events\UpdateOrderPackageExceptionListenerEvent' => [//order_packages的数据的异常数据变更时
            'App\Listeners\UpdateOrderPackageExceptionTypeCountingRecordListener',//更新OrderPackageExceptionTypeCountingRecord的统计信息
        ],
    ];

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

        //
    }
}
