package com.ffii.fpsms.modules.deliveryOrder.web.models

import java.math.BigDecimal

/**
 * Workbench v1: scan lot and post pick immediately (no separate submit step).
 * [qty] optional: when null, posts up to remaining quantity for this stock-out line chunk; when set, may exceed that
 * chunk and is capped only by available quantity on the scanned inventory lot line (overscan / UI edit).
 */
data class WorkbenchScanPickRequest(
    val stockOutLineId: Long,
    val lotNo: String,
    /** When set (e.g. from QR), resolves `inventory_lot` via `stockInLineId` instead of newest row by lotNo+itemId. */
    val stockInLineId: Long? = null,
    /** Optional store scope (e.g. 2/F, 2F). When set, split re-suggestions must stay within the same store. */
    val storeId: String? = null,
    /**
     * Optional: exclude these warehouse codes from any (re)suggest logic triggered by this scan.
     * Case-insensitive.
     */
    val excludeWarehouseCodes: List<String>? = null,
    /**
     * When set (e.g. label-print modal row), resolves this exact `inventory_lot_line` instead of
     * [stockInLineId] / newest-by-lotNo. Disambiguates duplicate lot numbers.
     */
    val inventoryLotLineId: Long? = null,
    val qty: BigDecimal? = null,
    val userId: Long = 1L,
)

