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/?_=1740494347073&timestamp=1740497567763#/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%2Fvat_invoice&method=post
 *
 * 增值税发票识别
 */
@NoArgsConstructor
@Data
public class BVatInvoiceResp  extends BBaseResp {


    @JsonProperty("log_id")
    private String logId;
    @JsonProperty("words_result_num")
    private Integer wordsResultNum;
    @JsonProperty("words_result")
    private WordsResultDTO wordsResult;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("InvoiceNumDigit")
        private String invoiceNumDigit;
        @JsonProperty("ServiceType")
        private String serviceType;
        @JsonProperty("InvoiceNum")
        private String invoiceNum;
        @JsonProperty("InvoiceNumConfirm")
        private String invoiceNumConfirm;
        @JsonProperty("SellerName")
        private String sellerName;
        @JsonProperty("CommodityTaxRate")
        private List<CommodityTaxRateDTO> commodityTaxRate;
        @JsonProperty("SellerBank")
        private String sellerBank;
        @JsonProperty("Checker")
        private String checker;
        @JsonProperty("TotalAmount")
        private String totalAmount;
        @JsonProperty("CommodityAmount")
        private List<CommodityAmountDTO> commodityAmount;
        @JsonProperty("InvoiceDate")
        private String invoiceDate;
        @JsonProperty("CommodityTax")
        private List<CommodityTaxDTO> commodityTax;
        @JsonProperty("PurchaserName")
        private String purchaserName;
        @JsonProperty("CommodityNum")
        private List<CommodityNumDTO> commodityNum;
        @JsonProperty("Province")
        private String province;
        @JsonProperty("City")
        private String city;
        @JsonProperty("SheetNum")
        private String sheetNum;
        @JsonProperty("Agent")
        private String agent;
        @JsonProperty("PurchaserBank")
        private String purchaserBank;
        @JsonProperty("Remarks")
        private String remarks;
        @JsonProperty("Password")
        private String password;
        @JsonProperty("SellerAddress")
        private String sellerAddress;
        @JsonProperty("PurchaserAddress")
        private String purchaserAddress;
        @JsonProperty("InvoiceCode")
        private String invoiceCode;
        @JsonProperty("InvoiceCodeConfirm")
        private String invoiceCodeConfirm;
        @JsonProperty("CommodityUnit")
        private List<CommodityUnitDTO> commodityUnit;
        @JsonProperty("Payee")
        private String payee;
        @JsonProperty("PurchaserRegisterNum")
        private String purchaserRegisterNum;
        @JsonProperty("CommodityPrice")
        private List<CommodityPriceDTO> commodityPrice;
        @JsonProperty("NoteDrawer")
        private String noteDrawer;
        @JsonProperty("AmountInWords")
        private String amountInWords;
        @JsonProperty("AmountInFiguers")
        private String amountInFiguers;
        @JsonProperty("TotalTax")
        private String totalTax;
        @JsonProperty("InvoiceType")
        private String invoiceType;
        @JsonProperty("SellerRegisterNum")
        private String sellerRegisterNum;
        @JsonProperty("CommodityName")
        private List<CommodityNameDTO> commodityName;
        @JsonProperty("CommodityType")
        private List<CommodityTypeDTO> commodityType;
        @JsonProperty("CommodityPlateNum")
        private List<?> commodityPlateNum;
        @JsonProperty("CommodityVehicleType")
        private List<?> commodityVehicleType;
        @JsonProperty("CommodityStartDate")
        private List<?> commodityStartDate;
        @JsonProperty("CommodityEndDate")
        private List<?> commodityEndDate;
        @JsonProperty("OnlinePay")
        private String onlinePay;

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

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

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

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

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

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

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

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