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

import com.baomidou.mybatisplus.annotation.TableField;
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 OldRefundManageItemBean {

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

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

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

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

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

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

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

    @ApiModelProperty("旧件图片地址")
    private String oldImage;

    @ApiModelProperty("铭牌")
    private String tab;

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

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

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

    @ApiModelProperty("新配件单位")
    @NotBlank(groups = {ValidGroup.Add.class, ValidGroup.Edit.class}, message = "新配件单位不能空")
    private String newGoodsStockUnit;

    @ApiModelProperty("维修记录编号")
    private String repairRecordNumber;

    @ApiModelProperty("机器条形码")
    private String machineBarcode;

    @ApiModelProperty("修复时间")
    private Date repairTime;

    @ApiModelProperty("旧压缩机编号")
    private String oldCompressNumber;

    @ApiModelProperty("新压缩机编号")
    private String newCompressNumber;

    @ApiModelProperty("配件条码")
    private String partsBarcode;

    @ApiModelProperty("安装日期")
    private Date installTime;

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

    @ApiModelProperty("是否备用件 false=否 true=是")
    private Boolean isBackup;

    @ApiModelProperty("是否备用件")
    private String isBackupName;

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

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