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

data class PrintRequest(
    val itemCode: String = "—",
    val itemName: String = "—",
    val lotNo: String = "—",
    val expiryDate: String? = null,
    val printerIp: String,
    val printerPort: Int,
    // Used for DataFlex QR payload (same semantics as python Bag2.py)
    val itemId: Long? = null,
    val stockInLineId: Long? = null,
    // For UI "+50/+10/+5/+1/C" printing. When -1 means continuous mode (backend prints up to 100).
    val printQty: Int = 1
)

data class LaserRequest(
    val templateId: String,   // The name of the file on the laser controller
    val itemCode: String,
    val itemName: String,
    val lotNo: String,
    val expiryDate: String,
    val power: String,        // Laser intensity (0-100)
    val speed: String,        // Marking speed
    val printerIp: String,
    val printerPort: Int
)

data class Laser2Request(
    val printerIp: String,
    val printerPort: String,
    val templateId: String? = null,      // 原有欄位（如果有）

    // 給 HANS600S-M TCP 用的欄位（必須有）
    val textChannel3: String? = null,
    val textChannel4: String? = null,
    val text3ObjectName: String? = "Text3",
    val text4ObjectName: String? = "Text4"
)

data class PrinterStatusRequest(
    val printerType: String,
    val printerIp: String? = null,
    val printerPort: Int? = null,
    val labelCom: String? = null,
)

data class PrinterStatusResponse(
    val connected: Boolean,
    val message: String,
)

data class OnPackQrDownloadRequest(
    val jobOrders: List<OnPackQrJobOrderRequest>,
)

data class OnPackQrJobOrderRequest(
    val jobOrderId: Long,
    val itemCode: String,
)

/** Result of POST /plastic/ngpcl/push-onpack-qr-text — server POSTs the lemon ZIP bytes to [ngpcl.push-url] when configured. */
data class NgpclPushResponse(
    val pushed: Boolean,
    val message: String,
)