package com.ffii.fpsms.modules.stock.web.model

import java.math.BigDecimal


data class LotLineInfo(
    val inventoryLotLineId: Long,
    val itemId: Long,
    val itemNo: String,
    val itemName: String,
    val lotNo: String,
    val remainingQty: BigDecimal,
    val uom: String,
    /** UomConversion id from inventory_lot_line.stockItemUom → item_uom.uom */
    val uomId: Long? = null,
)
data class UpdateInventoryLotLineStatusRequest(
    val inventoryLotLineId: Long,
    val status: String
)
data class QrCodeAnalysisRequest(
    val itemId: Long,
    val stockInLineId: Long,
    /** When set, sameItemLots only include lots with this UomConversion id. */
    val uomId: Long? = null,
)

data class ScannedLotInfo(
    val stockInLineId: Long,
    val lotNo: String,
    val inventoryLotLineId: Long,
    val warehouseCode: String? = null,
    val warehouseName: String? = null,
    val uom: String? = null,
    val uomId: Long? = null,
)

data class SameItemLotInfo(
    val lotNo: String,
    val inventoryLotLineId: Long,
    val stockInLineId: Long? = null,
    val availableQty: BigDecimal,
    val uom: String,
    val uomId: Long? = null,
    val warehouseCode: String? = null,
    val warehouseName: String? = null
)

data class QrCodeAnalysisResponse(
    val itemId: Long,
    val itemCode: String,
    val itemName: String,
    val scanned: ScannedLotInfo,
    val sameItemLots: List<SameItemLotInfo>
)

data class WorkbenchItemLotsResponse(
    val itemId: Long,
    val itemCode: String,
    val itemName: String,
    val sameItemLots: List<SameItemLotInfo>
)
