<?php

namespace Modules\Mall\Providers;

use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Modules\Mall\Events\OrderCreated;
use Modules\Mall\Events\OrderPaid;
use Modules\Mall\Events\RefundAgreed;
use Modules\Mall\Events\RefundCompleted;
use Modules\Mall\Listeners\OrderCreatedListener;
use Modules\Mall\Listeners\OrderPaidListener;
use Modules\Mall\Listeners\RefundAgreedListener;
use Modules\Mall\Listeners\RefundCompletedListener;

class EventServiceProvider extends ServiceProvider
{

    /**
     * The event listener mappings for the application.
     * @var array
     */
    protected $listen = [
        //订单创建
        OrderCreated::class    => [
            OrderCreatedListener::class,
        ],
        OrderPaid::class       => [
            OrderPaidListener::class,
        ],
        RefundAgreed::class    => [
            RefundAgreedListener::class,
        ],
        RefundCompleted::class => [
            RefundCompletedListener::class,
        ],
    ];

}
