package com.cwhelp.admin.business.validator;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author yan.y
 * @date 2019/08/26
 */
@Data
public class BssVatInvoiceValid implements Serializable {
    @NotEmpty(message = "发票代码不能为空")
    private String invoiceCode;
    @NotNull(message = "发票类型不能为空")
    private Integer invoiceType;
    @NotEmpty(message = "发票号码不能为空")
    private String invoiceNo;
    @NotEmpty(message = "发票日期不能为空")
    @Pattern(regexp = "[0-9]{4}-[0-9]{2}-[0-9]{2}", message = "日期格式不正确")
    private String invoiceDate;
    @NotEmpty(message = "校验码不能为空")
    private String checkCode;
    @NotNull(message = "发票金额不能为空")
    private BigDecimal invoiceMoney;
    @NotNull(message = "税额不能为空")
    private BigDecimal taxAmount;
    @NotNull(message = "总金额不能为空")
    private BigDecimal totalAmount;
    @NotEmpty(message = "总金额(大写)不能为空")
    private String totalAmountCn;

}