package com.ffii.fpsms.modules.pickOrder.web.models
import java.math.BigDecimal
import java.time.LocalDate

data class SubmitIssueRequest(
    val issueId: Long,
    val handler: Long? = null,
)

data class BatchSubmitIssueRequest(
    val issueIds: List<Long>,
    val handler: Long? = null,
)

data class SubmitExpiryRequest(
    val lotLineId: Long,
    val handler: Long? = null,
)

data class BatchSubmitExpiryRequest(
    val lotLineIds: List<Long>,
    val handler: Long? = null,
)
data class ExpiryItemResponse(
    val id: Long, // InventoryLotLine ID
    val itemId: Long,
    val itemCode: String,
    val itemDescription: String?,
    val lotId: Long, // InventoryLot ID
    val lotNo: String?,
    val storeLocation: String?,
    val expiryDate: LocalDate?,
    val remainingQty: BigDecimal,
)
data class LotIssueDetailRequest(
    val lotId: Long,
    val itemId: Long,
    val issueType: String // "miss" or "bad"
)

// New: Response for lot issue details
data class LotIssueDetailResponse(
    val lotId: Long?,
    val lotNo: String?,
    val itemId: Long,
    val itemCode: String?,
    val itemDescription: String?,
    val storeLocation: String?,
    val bookQty: BigDecimal?,
    val uomDesc: String?,

    val issues: List<IssueDetailItem>
)

data class IssueDetailItem(
    val issueId: Long,
    val pickerName: String?,
    val missQty: BigDecimal?,
    val issueQty: BigDecimal?,
    val pickOrderCode: String,
    val doOrderCode: String?,
    val joOrderCode: String?,
    val issueRemark: String?
)

// New: Request to submit with custom quantity
data class SubmitIssueWithQtyRequest(
    val lotId: Long,
    val itemId: Long,
    val issueType: String, // "miss" or "bad"
    val submitQty: BigDecimal, // User input quantity
    val handler: Long? = null
)