package com.gree.mall.miniapp.bean.material.parts;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.gree.mall.miniapp.bean.inf.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
@ApiModel
@JsonIgnoreProperties(value = {"id"}, allowGetters = true)
public class NewRefundManageItemBean {

    private static final long serialVersionUID = 1L;

    @Null(groups = {ValidGroup.Add.class}, message = "id必须为空")
    private String id;

    @ApiModelProperty("申请单号")
    private String applyNo;

    @ApiModelProperty("销售单id")
    private String salesId;

    @ApiModelProperty("配件编码")
    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "配件编码不能空")
    private String partsNumber;

    @ApiModelProperty("配件名称")
    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "配件名称不能空")
    private String partsName;

    @ApiModelProperty("物料组名称")
    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "物料组名称不能空")
    private String materialGroupName;

    @ApiModelProperty("单位名称")
    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "单位名称不能空")
    private String goodsStockUnit;

    @ApiModelProperty("数量")
    @NotNull(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "数量不能空")
    private BigDecimal qty;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("图片地址")
    private String image;

    @ApiModelProperty("自编码")
    private String customNo;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("库存数量")
    private BigDecimal stockQty = new BigDecimal("0");
}
