package com.heyu.api.baidu.response.financial;


import com.fasterxml.jackson.annotation.JsonProperty;
import com.heyu.api.baidu.response.BBaseResp;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


/**
 * https://console.bce.baidu.com/support/?_=1740575657628&timestamp=1740579670562#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E8%B4%A2%E5%8A%A1%E7%A5%A8%E6%8D%AEOCR&api=rest%2F2.0%2Focr%2Fv1%2Fshopping_receipt&method=post
 *
 * 购物小票识别
 */
@NoArgsConstructor
@Data
public class BShoppingReceiptResp  extends BBaseResp {


    @JsonProperty("words_result")
    private List<WordsResultDTO> wordsResult;
    @JsonProperty("log_id")
    private Long logId;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("total_amount")
        private List<TotalAmountDTO> totalAmount;
        @JsonProperty("discount")
        private List<DiscountDTO> discount;
        @JsonProperty("currency")
        private List<CurrencyDTO> currency;
        @JsonProperty("receipt_num")
        private List<ReceiptNumDTO> receiptNum;
        @JsonProperty("shop_name")
        private List<ShopNameDTO> shopName;
        @JsonProperty("consumption_time")
        private List<ConsumptionTimeDTO> consumptionTime;
        @JsonProperty("consumption_date")
        private List<ConsumptionDateDTO> consumptionDate;
        @JsonProperty("table_row_num")
        private Integer tableRowNum;
        @JsonProperty("table")
        private List<TableDTO> table;
        @JsonProperty("paid_amount")
        private List<PaidAmountDTO> paidAmount;
        @JsonProperty("print_date")
        private List<PrintDateDTO> printDate;
        @JsonProperty("machine_num")
        private List<MachineNumDTO> machineNum;
        @JsonProperty("change")
        private List<ChangeDTO> change;
        @JsonProperty("employee_num")
        private List<EmployeeNumDTO> employeeNum;
        @JsonProperty("print_time")
        private List<PrintTimeDTO> printTime;

        @NoArgsConstructor
        @Data
        public static class TotalAmountDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class DiscountDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class CurrencyDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class ReceiptNumDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class ShopNameDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class ConsumptionTimeDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class ConsumptionDateDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class TableDTO {
            @JsonProperty("product")
            private ProductDTO product;
            @JsonProperty("quantity")
            private QuantityDTO quantity;
            @JsonProperty("unit_price")
            private UnitPriceDTO unitPrice;
            @JsonProperty("subtotal_amount")
            private SubtotalAmountDTO subtotalAmount;

            @NoArgsConstructor
            @Data
            public static class ProductDTO {
                @JsonProperty("word")
                private String word;
            }

            @NoArgsConstructor
            @Data
            public static class QuantityDTO {
                @JsonProperty("word")
                private String word;
            }

            @NoArgsConstructor
            @Data
            public static class UnitPriceDTO {
                @JsonProperty("word")
                private String word;
            }

            @NoArgsConstructor
            @Data
            public static class SubtotalAmountDTO {
                @JsonProperty("word")
                private String word;
            }
        }

        @NoArgsConstructor
        @Data
        public static class PaidAmountDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class PrintDateDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class MachineNumDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class ChangeDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class EmployeeNumDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class PrintTimeDTO {
            @JsonProperty("word")
            private String word;
        }
    }
}
