<?php

namespace App\Modules\Stock;

use Illuminate\Support\Facades\Event;

class ServiceProvider extends \App\Modules\ServiceProvider
{
    public function register()
    {
        parent::register('stock');
    }

    public function boot()
    {
        parent::boot('stock');

        //Observers

        StockTransaction::observe(new StockTransactionObserver());
        StockPurchaseOrderItem::observe(new StockPurchaseOrderItemObserver());
        StockPurchaseOrderItemSerial::observe(new StockPurchaseOrderItemSerialObserver());
        Stock::observe(new StockObserver());

        Event::subscribe(new StockRequested());
        Event::subscribe(new CancelRequestedStock());
        Event::subscribe(new StockItemsModified());
        Event::subscribe(new StockReportCreated());
    }
}
