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

import com.fasterxml.jackson.annotation.JsonFormat
import java.time.LocalDate
import java.time.LocalTime

data class WorkbenchMergeTicketCandidate(
    val id: Long,
    val ticketNo: String?,
    val releaseType: String?,
    val shopId: Long?,
    val shopCode: String?,
    val shopName: String?,
    val storeId: String?,
    val truckId: Long?,
    @JsonFormat(pattern = "yyyy-MM-dd")
    val requiredDeliveryDate: LocalDate?,
    val truckLanceCode: String?,
    @JsonFormat(pattern = "HH:mm")
    val truckDepartureTime: LocalTime?,
    val loadingSequence: Int?,
    val deliveryOrderCodes: List<String>,
    /** Stable lane identity for same-truck merge matching (2/F, 4/F, truck-X). */
    val laneKey: String,
)

data class WorkbenchMergeTicketCandidatesResponse(
    val batchFamilyTickets: List<WorkbenchMergeTicketCandidate>,
    val isExtraTickets: List<WorkbenchMergeTicketCandidate>,
)

data class WorkbenchMergeTicketsRequest(
    val batchOrSingleDopoId: Long,
    val isExtraDopoId: Long,
)
