<?php

namespace Modules\Bms\Services\Contracts;

/**
 * Inventory boundary — reuses ERP stock. Per-event consumable consumption
 * posting and warehouse→hall / hall→hall transfer movements flow through
 * here. Implemented against the ERP core in Milestone 7.
 */
interface StockServiceContract
{
    /**
     * Post consumption of consumables for an event (decrements ERP stock).
     *
     * @param  array  $lines  [['product_id','variation_id','quantity','location_id'], ...]
     * @return array  movement references
     */
    public function postEventConsumption(int $businessId, int $bookingId, array $lines): array;

    /**
     * Post a stock transfer movement between two ERP locations.
     *
     * @return int|null  ERP transfer transaction id
     */
    public function postTransfer(int $businessId, int $fromLocationId, int $toLocationId, array $lines, array $meta = []): ?int;
}
