/**
 * @filename:SalesCommodityDto 2024-09-03
 * @project KJT v1.0.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.service.trade.salescontract.dto;

import java.math.BigDecimal;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.trade.common.core.domain.CommonEntity;
import com.trade.common.validate.ValidatorGroup;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description:销售商品实体类
 * @version: v1.0.0
 * @author: wanglang
 */
@Data
@EqualsAndHashCode(callSuper = false)
// @Accessors(chain = true)
@Valid
public class SalesCommodityDto extends CommonEntity<SalesCommodityDto> {

    private static final long serialVersionUID = 1725342360664L;
    /**
     * 销售合同主键
     */
    @ApiModelProperty(name = "salesContractId", value = "销售合同主键")
    // @NotNull(message = "销售合同主键不能为空", groups = {
    // ValidatorGroup.Submit.class
    // })
    private Long salesContractId;
    /**
     * 供应商编号
     */
    @ApiModelProperty(name = "entityNo", value = "供应商编号")
    private String entityNo;
    /**
     * 供应商名称
     */
    @ApiModelProperty(name = "entityName", value = "供应商名称")
    private String entityName;
    /**
     * 商品编码
     */
    @ApiModelProperty(name = "hsCode", value = "商品编码")
    @NotBlank(message = "商品编码不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String hsCode;
    /**
     * 商品名称
     */
    @ApiModelProperty(name = "name", value = "商品名称")
    // @NotBlank(message = "商品名称不能为空", groups = {
    // ValidatorGroup.Submit.class
    // })
    private String name;
    /**
     * 报关品名
     */
    @NotBlank(message = "报关品名不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String declarationName;
    /**
     * 包装规格
     */
    @ApiModelProperty(name = "packSpec", value = "包装规格")
    @NotBlank(message = "包装规格不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String packSpec;
    /**
     * 计量单位
     */
    @ApiModelProperty(name = "measurementUnit", value = "计量单位")
    @NotBlank(message = "计量单位不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String measurementUnit;
    /**
     * 出口退税率/增值税退税率
     */
    @ApiModelProperty(name = "exportTaxRebateRate", value = "出口退税率/增值税退税率")
    @NotBlank(message = "出口退税税率不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String exportTaxRebateRate = "0";
    /**
     * 增值税率/增值税征税率
     */
    @ApiModelProperty(name = "addedTaxRate", value = "增值税率/增值税征税率")
    @NotBlank(message = "增值税征税率不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String addedTaxRate = "0";
    /**
     * 数量
     */
    @NotNull(message = "数量不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "number", value = "数量")
    private BigDecimal number;
    /***
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "priceUnit", value = "单价")
    private BigDecimal priceUnit;
    /**
     * 币种
     */
    @ApiModelProperty(name = "currency", value = "币种")
    private String currency = "USD";
    /*
     * 金额
     */
    @ApiModelProperty(name = "amount", value = "金额")
    @NotNull(message = "金额不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private BigDecimal amount;
    @ApiModelProperty(name = "model", value = "型号")
    private String model;
    @ApiModelProperty(name = "errorsValidator", value = "错误原因")
    private String errorsValidator;
}
