package com.unibuy.smartdevice.structure;

import org.json.JSONArray;

public class ReportFlowInfoStructure {
    String orderId;
    int flowType;
    String flowSendInfo;
    String flowRequestInfo;
    String productId;
    int totalPrice;
    String invoiceInfo;
    String flowBarCode;
    int flowStatusType;
    int giveChange;
    int usePoints;
    // 現金收款面額明細（僅現金 payment_type=9 有值）：仟/伍佰/佰紙鈔張數 + 50/10/5/1 硬幣個數。
    // 由 CashPayDialogGeneral 於付款完成寫入，供 TransactionFinalizeBuilder 組 cash_detail 上報。
    int cashBill1000;
    int cashBill500;
    int cashBill100;
    int cashCoin50;
    int cashCoin10;
    int cashCoin5;
    int cashCoin1;
    String reportFlowId;
    // MQTT 交易結案流水號：進入付款時生成一次，pending → completed/failed 全程共用同一個，
    // 讓後台依同一 flow_id 做狀態轉移。與 reportFlowId（取貨碼/通行碼驗證碼、B600 legacy）語意不同，獨立一欄。
    String mqttFlowId;
    JSONArray shoppingCartInfoByJsonArray;

    public ReportFlowInfoStructure(String orderId, int flowType, String flowSendInfo, String flowRequestInfo, String productId, int totalPrice, String invoiceInfo, String flowBarCode, int flowStatusType, int giveChange, int usePoints, JSONArray shoppingCartInfoByJsonArray) {
        this.orderId = orderId;
        this.flowType = flowType;
        this.flowSendInfo = flowSendInfo;
        this.flowRequestInfo = flowRequestInfo;
        this.productId = productId;
        this.totalPrice = totalPrice;
        this.invoiceInfo = invoiceInfo;
        this.flowBarCode = flowBarCode;
        this.flowStatusType = flowStatusType;
        this.giveChange = giveChange;
        this.usePoints = usePoints;
        this.shoppingCartInfoByJsonArray = shoppingCartInfoByJsonArray;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public int getFlowType() {
        return flowType;
    }

    public void setFlowType(int flowType) {
        this.flowType = flowType;
    }

    public String getFlowSendInfo() {
        return flowSendInfo;
    }

    public void setFlowSendInfo(String flowSendInfo) {
        this.flowSendInfo = flowSendInfo;
    }

    public String getFlowRequestInfo() {
        return flowRequestInfo;
    }

    public void setFlowRequestInfo(String flowRequestInfo) {
        this.flowRequestInfo = flowRequestInfo;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public int getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(int totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getInvoiceInfo() {
        return invoiceInfo;
    }

    public void setInvoiceInfo(String invoiceInfo) {
        this.invoiceInfo = invoiceInfo;
    }

    public String getFlowBarCode() {
        return flowBarCode;
    }

    public void setFlowBarCode(String flowBarCode) {
        this.flowBarCode = flowBarCode;
    }

    public int getFlowStatusType() {
        return flowStatusType;
    }

    public void setFlowStatusType(int flowStatusType) {
        this.flowStatusType = flowStatusType;
    }

    public int getGiveChange() {
        return giveChange;
    }

    public void setGiveChange(int giveChange) {
        this.giveChange = giveChange;
    }

    public int getUsePoints() {
        return usePoints;
    }

    public void setUsePoints(int usePoints) {
        this.usePoints = usePoints;
    }

    public int getCashBill1000() { return cashBill1000; }
    public void setCashBill1000(int cashBill1000) { this.cashBill1000 = cashBill1000; }

    public int getCashBill500() { return cashBill500; }
    public void setCashBill500(int cashBill500) { this.cashBill500 = cashBill500; }

    public int getCashBill100() { return cashBill100; }
    public void setCashBill100(int cashBill100) { this.cashBill100 = cashBill100; }

    public int getCashCoin50() { return cashCoin50; }
    public void setCashCoin50(int cashCoin50) { this.cashCoin50 = cashCoin50; }

    public int getCashCoin10() { return cashCoin10; }
    public void setCashCoin10(int cashCoin10) { this.cashCoin10 = cashCoin10; }

    public int getCashCoin5() { return cashCoin5; }
    public void setCashCoin5(int cashCoin5) { this.cashCoin5 = cashCoin5; }

    public int getCashCoin1() { return cashCoin1; }
    public void setCashCoin1(int cashCoin1) { this.cashCoin1 = cashCoin1; }

    public JSONArray getShoppingCartInfoByJsonArray() {
        return shoppingCartInfoByJsonArray;
    }

    public void setShoppingCartInfoByJsonArray(JSONArray shoppingCartInfoByJsonArray) {
        this.shoppingCartInfoByJsonArray = shoppingCartInfoByJsonArray;
    }

    public String getReportFlowId() {
        return reportFlowId;
    }

    public void setReportFlowId(String reportFlowId) {
        this.reportFlowId = reportFlowId;
    }

    public String getMqttFlowId() {
        return mqttFlowId;
    }

    public void setMqttFlowId(String mqttFlowId) {
        this.mqttFlowId = mqttFlowId;
    }

    @Override
    public String toString() {
        return "ReportFlowInfoStructure{" +
                "orderId='" + orderId + '\'' +
                ", flowType=" + flowType +
                ", flowSendInfo='" + flowSendInfo + '\'' +
                ", flowRequestInfo='" + flowRequestInfo + '\'' +
                ", productId='" + productId + '\'' +
                ", totalPrice=" + totalPrice +
                ", invoiceInfo='" + invoiceInfo + '\'' +
                ", flowBarCode='" + flowBarCode + '\'' +
                ", flowStatusType=" + flowStatusType +
                ", giveChange=" + giveChange +
                ", usePoints=" + usePoints +
                ", shoppingCartInfoByJsonArray=" + shoppingCartInfoByJsonArray +
                '}';
    }
}
