package com.jeeplus.assess.invoice.domain.OMS.InvoiceDown;

import com.google.common.collect.Lists;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * OMS发票详情主信息实体类
 * 发票主表信息，与OMSDownItem发票明细表为一对多关系
 */
public class OMSInvoiceDetailInfo {
    /**
     * 发票代码
     * 非必填，12个字节
     */
    private String invcode;

    /**
     * 发票号码
     * 非必填，8个字节
     */
    private String invno;

    /**
     * 数电发票号码
     * 必填，20个字节
     */
    @NotBlank(message = "数电发票号码allEinVno不能为空")
    private String allEinVno;

    /**
     * 订单号
     * 必填，50个字节
     */
    @NotBlank(message = "订单号orderno不能为空")
    private String orderno;

    /**
     * 购买方名称
     * 必填，100个字节
     */
    @NotBlank(message = "购买方名称buyerName不能为空")
    private String buyerName;

    /**
     * 购买方纳税人识别号
     * 非必填，20个字节
     */
    private String buyerTaxno;

    /**
     * 购买方地址
     * 非必填，140个字节
     */
    private String buyerAddr;

    /**
     * 购买方电话
     * 非必填，20个字节
     */
    private String buyerPhone;

    /**
     * 购买方开户行名称
     * 非必填，50个字节
     */
    private String buyerBank;

    /**
     * 购买方开户行银行账号
     * 非必填，50个字节
     */
    private String buyerBankaccount;

    /**
     * 购买方经办人
     * 非必填，16个字节
     */
    private String buyerHandler;

    /**
     * 经办人身份证件号码
     * 非必填，20个字节
     */
    private String buyerHandlerIdcardno;

    /**
     * 经办人联系电话
     * 非必填，20个字节
     */
    private String buyerHandlerPhone;

    /**
     * 销售方名称
     * 必填，100个字节
     */
    @NotBlank(message = "销售方名称sellerName不能为空")
    private String sellerName;

    /**
     * 销售方纳税人识别号
     * 非必填，20个字节
     */
    private String sellerTaxno;

    /**
     * 销售方地址
     * 非必填，140个字节
     */
    private String sellerAddr;

    /**
     * 销售方电话
     * 非必填，20个字节
     */
    private String sellerPhone;

    /**
     * 销售方开户行名称
     * 非必填，50个字节
     */
    private String sellerBank;

    /**
     * 销售方开户行银行账号
     * 非必填，50个字节
     */
    private String sellerBankaccount;

    /**
     * 订单来源
     * 非必填，2个字节
     */
    private String orderSource;

    /**
     * 开票类型
     * 必填，2个字节
     */
    @NotBlank(message = "开票类型invKind不能为空")
    private String invKind;

    /**
     * 发票类型
     * 必填，2个字节
     */
    @NotBlank(message = "发票类型invType不能为空")
    private String invType;

    /**
     * 开票日期
     * 必填
     */
    @NotNull(message = "开票日期invDate不能为空")
    private Date invDate;

    /**
     * 原蓝票发票代码
     * 非必填，12个字节
     */
    private String originalInvcode;

    /**
     * 原蓝票发票号码
     * 非必填，20个字节
     */
    private String originalInvno;

    /**
     * 红字确认信息单编号
     * 非必填，32个字节
     */
    private String redNo;

    /**
     * 红字发票标签
     * 非必填，2个字节
     */
    private String redLabel;

    /**
     * 备注
     * 非必填，200个字节
     */
    private String remarks;

    /**
     * 合计金额（不含税）
     * 必填，保留2位小数
     */
    @NotNull(message = "合计金额（不含税）totalAmount不能为空")
    private BigDecimal totalAmount;

    /**
     * 合计税额
     * 必填，保留2位小数
     */
    @NotNull(message = "合计税额totalTax不能为空")
    private BigDecimal totalTax;

    /**
     * 价税合计
     * 必填，保留2位小数
     */
    @NotNull(message = "价税合计totalTaxamount不能为空")
    private BigDecimal totalTaxamount;

    /**
     * 差额征税标签
     * 非必填，2个字节
     */
    private String diffFlag;

    /**
     * 开票人
     * 必填，8个字节
     */
    @NotBlank(message = "开票人drawer不能为空")
    private String drawer;

    /**
     * 收款人
     * 非必填，20个字节
     */
    private String payee;

    /**
     * 复核人
     * 非必填，20个字节
     */
    private String checker;

    /**
     * 开票人证件号码
     * 非必填，30个字节
     */
    private String drawerIdcardno;

    /**
     * 开票人证件类型
     * 非必填，40个字节
     */
    private String drawerIdcardtype;

    /**
     * 收款银行名称
     * 非必填，40个字节
     */
    private String payeeBank;

    /**
     * 收款银行账号
     * 非必填，40个字节
     */
    private String payeeBankaccount;

    /**
     * 收购标识
     * 非必填，2个字节
     */
    private String purchaseLabel;

    /**
     * 结算方式
     * 非必填，2个字节
     */
    private String settlementType;

    /**
     * 特定要素
     * 非必填，2个字节
     */
    private String specificFactor;

    /**
     * 发票状态
     * 必填，1个字节
     */
    @NotBlank(message = "发票状态invStatus不能为空")
    private String invStatus;

    /**
     * 发票pdf文件地址
     * 非必填
     */
    private String pdfUrl;

    /**
     * 发票ofd文件地址
     * 非必填
     */
    private String ofdUrl;

    /**
     * 发票xml文件地址
     * 非必填
     */
    private String xmlUrl;

    /**
     * 失败原因
     * 非必填
     */
    private String failCause;


    // ======================== 以下所有关联实体 全部改为 List集合类型 ========================


    /**
     * 发票明细行信息集合
     * 非必填 发票核心明细项 一对多关联
     */
    private List<OMSDownItem> items =  Lists.newArrayList();

    /**
     * 附加要素信息列表
     * 非必填 发票备注展示附加要素信息
     */
    private List<OMSDownAdditional> additionalList =  Lists.newArrayList();

    /**
     * 建筑服务信息集合
     * 非必填 建筑服务类发票专用
     */
    private List<OMSDownBuildingInfo> buildingInfo =  Lists.newArrayList();

    /**
     * 货物运输信息集合
     * 非必填 货物运输类发票专用
     */
    private List<OMSDownGoodsTransport> goodsTransports =  Lists.newArrayList();

    /**
     * 旅客运输信息集合
     * 非必填 旅客运输类发票专用
     */
    private List<OMSDownTravellerTransport> travellerTransports =  Lists.newArrayList();

    /**
     * 不动产租赁服务信息集合
     * 非必填 不动产租赁类发票专用
     */
    private List<OMSDownRealPropertyRentInfo> realPropertyRentInfo =  Lists.newArrayList();

    /**
     * 不动产销售信息集合
     * 非必填 不动产销售类发票专用
     */
    private List<OMSDownRealPropertySellInfo> realPropertySellInfo =  Lists.newArrayList();

    /**
     * 代收车船税信息集合
     * 非必填 车船税代收类发票专用
     */
    private List<OMSDownVehicleVesselInfo> vehicleVesselInfo =  Lists.newArrayList();

    /**
     * 拖拉机与联合收割机信息集合
     * 非必填 农机类发票专用
     */
    private List<OMSDownHarvesterInfo> harvesterInfo =  Lists.newArrayList();

    /**
     * 机动车销售统一发票信息集合
     * 非必填 机动车销售类发票专用
     */
    private List<OMSDownVehicle> vehicle =  Lists.newArrayList();

    /**
     * 二手车销售统一发票信息集合
     * 非必填 二手车销售类发票专用
     */
    private List<OMSDownUsedCarSales> usedCarSales =  Lists.newArrayList();

    /**
     * 二手车发票关联信息集合
     * 非必填 二手车发票关联专用
     */
    private List<OMSDownUsedCar> usedCar =  Lists.newArrayList();

    /**
     * 共同购买方信息集合
     * 非必填 多方共同购买时传入
     */
    private List<OMSDownJointBuyer> jointBuyer =  Lists.newArrayList();


    public String getInvcode() {
        return invcode;
    }

    public void setInvcode(String invcode) {
        this.invcode = invcode;
    }

    public String getInvno() {
        return invno;
    }

    public void setInvno(String invno) {
        this.invno = invno;
    }

    public String getAllEinVno() {
        return allEinVno;
    }

    public void setAllEinVno(String allEinVno) {
        this.allEinVno = allEinVno;
    }

    public String getOrderno() {
        return orderno;
    }

    public void setOrderno(String orderno) {
        this.orderno = orderno;
    }

    public String getBuyerName() {
        return buyerName;
    }

    public void setBuyerName(String buyerName) {
        this.buyerName = buyerName;
    }

    public String getBuyerTaxno() {
        return buyerTaxno;
    }

    public void setBuyerTaxno(String buyerTaxno) {
        this.buyerTaxno = buyerTaxno;
    }

    public String getBuyerAddr() {
        return buyerAddr;
    }

    public void setBuyerAddr(String buyerAddr) {
        this.buyerAddr = buyerAddr;
    }

    public String getBuyerPhone() {
        return buyerPhone;
    }

    public void setBuyerPhone(String buyerPhone) {
        this.buyerPhone = buyerPhone;
    }

    public String getBuyerBank() {
        return buyerBank;
    }

    public void setBuyerBank(String buyerBank) {
        this.buyerBank = buyerBank;
    }

    public String getBuyerBankaccount() {
        return buyerBankaccount;
    }

    public void setBuyerBankaccount(String buyerBankaccount) {
        this.buyerBankaccount = buyerBankaccount;
    }

    public String getBuyerHandler() {
        return buyerHandler;
    }

    public void setBuyerHandler(String buyerHandler) {
        this.buyerHandler = buyerHandler;
    }

    public String getBuyerHandlerIdcardno() {
        return buyerHandlerIdcardno;
    }

    public void setBuyerHandlerIdcardno(String buyerHandlerIdcardno) {
        this.buyerHandlerIdcardno = buyerHandlerIdcardno;
    }

    public String getBuyerHandlerPhone() {
        return buyerHandlerPhone;
    }

    public void setBuyerHandlerPhone(String buyerHandlerPhone) {
        this.buyerHandlerPhone = buyerHandlerPhone;
    }

    public String getSellerName() {
        return sellerName;
    }

    public void setSellerName(String sellerName) {
        this.sellerName = sellerName;
    }

    public String getSellerTaxno() {
        return sellerTaxno;
    }

    public void setSellerTaxno(String sellerTaxno) {
        this.sellerTaxno = sellerTaxno;
    }

    public String getSellerAddr() {
        return sellerAddr;
    }

    public void setSellerAddr(String sellerAddr) {
        this.sellerAddr = sellerAddr;
    }

    public String getSellerPhone() {
        return sellerPhone;
    }

    public void setSellerPhone(String sellerPhone) {
        this.sellerPhone = sellerPhone;
    }

    public String getSellerBank() {
        return sellerBank;
    }

    public void setSellerBank(String sellerBank) {
        this.sellerBank = sellerBank;
    }

    public String getSellerBankaccount() {
        return sellerBankaccount;
    }

    public void setSellerBankaccount(String sellerBankaccount) {
        this.sellerBankaccount = sellerBankaccount;
    }

    public String getOrderSource() {
        return orderSource;
    }

    public void setOrderSource(String orderSource) {
        this.orderSource = orderSource;
    }

    public String getInvKind() {
        return invKind;
    }

    public void setInvKind(String invKind) {
        this.invKind = invKind;
    }

    public String getInvType() {
        return invType;
    }

    public void setInvType(String invType) {
        this.invType = invType;
    }

    public Date getInvDate() {
        return invDate;
    }

    public void setInvDate(Date invDate) {
        this.invDate = invDate;
    }

    public String getOriginalInvcode() {
        return originalInvcode;
    }

    public void setOriginalInvcode(String originalInvcode) {
        this.originalInvcode = originalInvcode;
    }

    public String getOriginalInvno() {
        return originalInvno;
    }

    public void setOriginalInvno(String originalInvno) {
        this.originalInvno = originalInvno;
    }

    public String getRedNo() {
        return redNo;
    }

    public void setRedNo(String redNo) {
        this.redNo = redNo;
    }

    public String getRedLabel() {
        return redLabel;
    }

    public void setRedLabel(String redLabel) {
        this.redLabel = redLabel;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalTax() {
        return totalTax;
    }

    public void setTotalTax(BigDecimal totalTax) {
        this.totalTax = totalTax;
    }

    public BigDecimal getTotalTaxamount() {
        return totalTaxamount;
    }

    public void setTotalTaxamount(BigDecimal totalTaxamount) {
        this.totalTaxamount = totalTaxamount;
    }

    public String getDiffFlag() {
        return diffFlag;
    }

    public void setDiffFlag(String diffFlag) {
        this.diffFlag = diffFlag;
    }

    public String getDrawer() {
        return drawer;
    }

    public void setDrawer(String drawer) {
        this.drawer = drawer;
    }

    public String getPayee() {
        return payee;
    }

    public void setPayee(String payee) {
        this.payee = payee;
    }

    public String getChecker() {
        return checker;
    }

    public void setChecker(String checker) {
        this.checker = checker;
    }

    public String getDrawerIdcardno() {
        return drawerIdcardno;
    }

    public void setDrawerIdcardno(String drawerIdcardno) {
        this.drawerIdcardno = drawerIdcardno;
    }

    public String getDrawerIdcardtype() {
        return drawerIdcardtype;
    }

    public void setDrawerIdcardtype(String drawerIdcardtype) {
        this.drawerIdcardtype = drawerIdcardtype;
    }

    public String getPayeeBank() {
        return payeeBank;
    }

    public void setPayeeBank(String payeeBank) {
        this.payeeBank = payeeBank;
    }

    public String getPayeeBankaccount() {
        return payeeBankaccount;
    }

    public void setPayeeBankaccount(String payeeBankaccount) {
        this.payeeBankaccount = payeeBankaccount;
    }

    public String getPurchaseLabel() {
        return purchaseLabel;
    }

    public void setPurchaseLabel(String purchaseLabel) {
        this.purchaseLabel = purchaseLabel;
    }

    public String getSettlementType() {
        return settlementType;
    }

    public void setSettlementType(String settlementType) {
        this.settlementType = settlementType;
    }

    public String getSpecificFactor() {
        return specificFactor;
    }

    public void setSpecificFactor(String specificFactor) {
        this.specificFactor = specificFactor;
    }

    public String getInvStatus() {
        return invStatus;
    }

    public void setInvStatus(String invStatus) {
        this.invStatus = invStatus;
    }

    public String getPdfUrl() {
        return pdfUrl;
    }

    public void setPdfUrl(String pdfUrl) {
        this.pdfUrl = pdfUrl;
    }

    public String getOfdUrl() {
        return ofdUrl;
    }

    public void setOfdUrl(String ofdUrl) {
        this.ofdUrl = ofdUrl;
    }

    public String getXmlUrl() {
        return xmlUrl;
    }

    public void setXmlUrl(String xmlUrl) {
        this.xmlUrl = xmlUrl;
    }

    public String getFailCause() {
        return failCause;
    }

    public void setFailCause(String failCause) {
        this.failCause = failCause;
    }

    public List<OMSDownItem> getItems() {
        return items;
    }

    public void setItems(List<OMSDownItem> items) {
        this.items = items;
    }

    public List<OMSDownAdditional> getAdditionalList() {
        return additionalList;
    }

    public void setAdditionalList(List<OMSDownAdditional> additionalList) {
        this.additionalList = additionalList;
    }

    public List<OMSDownBuildingInfo> getBuildingInfo() {
        return buildingInfo;
    }

    public void setBuildingInfo(List<OMSDownBuildingInfo> buildingInfo) {
        this.buildingInfo = buildingInfo;
    }

    public List<OMSDownGoodsTransport> getGoodsTransports() {
        return goodsTransports;
    }

    public void setGoodsTransports(List<OMSDownGoodsTransport> goodsTransports) {
        this.goodsTransports = goodsTransports;
    }

    public List<OMSDownTravellerTransport> getTravellerTransports() {
        return travellerTransports;
    }

    public void setTravellerTransports(List<OMSDownTravellerTransport> travellerTransports) {
        this.travellerTransports = travellerTransports;
    }

    public List<OMSDownRealPropertyRentInfo> getRealPropertyRentInfo() {
        return realPropertyRentInfo;
    }

    public void setRealPropertyRentInfo(List<OMSDownRealPropertyRentInfo> realPropertyRentInfo) {
        this.realPropertyRentInfo = realPropertyRentInfo;
    }

    public List<OMSDownRealPropertySellInfo> getRealPropertySellInfo() {
        return realPropertySellInfo;
    }

    public void setRealPropertySellInfo(List<OMSDownRealPropertySellInfo> realPropertySellInfo) {
        this.realPropertySellInfo = realPropertySellInfo;
    }

    public List<OMSDownVehicleVesselInfo> getVehicleVesselInfo() {
        return vehicleVesselInfo;
    }

    public void setVehicleVesselInfo(List<OMSDownVehicleVesselInfo> vehicleVesselInfo) {
        this.vehicleVesselInfo = vehicleVesselInfo;
    }

    public List<OMSDownHarvesterInfo> getHarvesterInfo() {
        return harvesterInfo;
    }

    public void setHarvesterInfo(List<OMSDownHarvesterInfo> harvesterInfo) {
        this.harvesterInfo = harvesterInfo;
    }

    public List<OMSDownVehicle> getVehicle() {
        return vehicle;
    }

    public void setVehicle(List<OMSDownVehicle> vehicle) {
        this.vehicle = vehicle;
    }

    public List<OMSDownUsedCarSales> getUsedCarSales() {
        return usedCarSales;
    }

    public void setUsedCarSales(List<OMSDownUsedCarSales> usedCarSales) {
        this.usedCarSales = usedCarSales;
    }

    public List<OMSDownUsedCar> getUsedCar() {
        return usedCar;
    }

    public void setUsedCar(List<OMSDownUsedCar> usedCar) {
        this.usedCar = usedCar;
    }

    public List<OMSDownJointBuyer> getJointBuyer() {
        return jointBuyer;
    }

    public void setJointBuyer(List<OMSDownJointBuyer> jointBuyer) {
        this.jointBuyer = jointBuyer;
    }
}
