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

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 发票下行明细信息实体类
 * 发票核心明细项，与发票主表一一关联
 */
public class OMSDownItem {
    /**
     * 行号
     * 必填，8个字节
     */
    @NotBlank(message = "行号lineCode不能为空")
    private String lineCode;

    /**
     * 发票行性质
     * 必填，2个字节
     */
    @NotBlank(message = "发票行性质lineType不能为空")
    private String lineType;

    /**
     * 商品名称
     * 必填，90个字节（一个汉字占2个字节）
     */
    @NotBlank(message = "商品名称goodsName不能为空")
    private String goodsName;

    /**
     * 规格型号
     * 非必填，40个字节
     */
    private String model;

    /**
     * 计量单位
     * 非必填，20个字节
     */
    private String unit;

    /**
     * 数量
     * 非必填，高精度数值，保留10位小数
     */
    private BigDecimal qty;

    /**
     * 单价
     * 非必填，高精度数值，保留10位小数
     */
    private BigDecimal price;

    /**
     * 金额(不含税)
     * 必填，高精度金额，保留2位小数
     */
    @NotNull(message = "金额amount不能为空")
    private BigDecimal amount;

    /**
     * 税率
     * 必填，高精度数值，保留3位小数
     */
    @NotNull(message = "税率taxrate不能为空")
    private BigDecimal taxrate;

    /**
     * 税额
     * 必填，高精度金额，保留2位小数
     */
    @NotNull(message = "税额tax不能为空")
    private BigDecimal tax;

    /**
     * 含税金额
     * 必填，高精度金额，保留2位小数
     */
    @NotNull(message = "含税金额taxamount不能为空")
    private BigDecimal taxamount;

    /**
     * 优惠政策标识
     * 非必填，2个字节
     */
    private String taxpre;

    /**
     * 税收分类编码
     * 必填，19个字节
     */
    @NotBlank(message = "税收分类编码goodstaxno不能为空")
    private String goodstaxno;

    /**
     * 扣除额
     * 非必填，高精度金额，保留2位小数
     */
    private BigDecimal deduction;

    /**
     * 税收分类编码简称
     * 非必填，100个字节
     */
    private String codeAbb;

    public String getLineCode() {
        return lineCode;
    }

    public void setLineCode(String lineCode) {
        this.lineCode = lineCode;
    }

    public String getLineType() {
        return lineType;
    }

    public void setLineType(String lineType) {
        this.lineType = lineType;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getQty() {
        return qty;
    }

    public void setQty(BigDecimal qty) {
        this.qty = qty;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getTaxrate() {
        return taxrate;
    }

    public void setTaxrate(BigDecimal taxrate) {
        this.taxrate = taxrate;
    }

    public BigDecimal getTax() {
        return tax;
    }

    public void setTax(BigDecimal tax) {
        this.tax = tax;
    }

    public BigDecimal getTaxamount() {
        return taxamount;
    }

    public void setTaxamount(BigDecimal taxamount) {
        this.taxamount = taxamount;
    }

    public String getTaxpre() {
        return taxpre;
    }

    public void setTaxpre(String taxpre) {
        this.taxpre = taxpre;
    }

    public String getGoodstaxno() {
        return goodstaxno;
    }

    public void setGoodstaxno(String goodstaxno) {
        this.goodstaxno = goodstaxno;
    }

    public BigDecimal getDeduction() {
        return deduction;
    }

    public void setDeduction(BigDecimal deduction) {
        this.deduction = deduction;
    }

    public String getCodeAbb() {
        return codeAbb;
    }

    public void setCodeAbb(String codeAbb) {
        this.codeAbb = codeAbb;
    }
}
