package com.zfire.mall.manager.bean.manage.material;

import com.zfire.mall.manager.bean.valid.EditGroup;
import com.zfire.mall.manager.plus.entity.ProductComposeRela;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value="ProductComposeBean对象", description="ProductComposeBean对象")
public class ProductComposeBean {

    private static final long serialVersionUID=1L;

    @NotEmpty(message = "编码不能空", groups = EditGroup.class)
    @ApiModelProperty(value = "编码", notes = "添加时非填充，编辑时必填")
    private String id;

    @ApiModelProperty(value = "企业id")
    private String adminCompanyId;

    @NotEmpty(message = "金蝶物料id不能空")
    @ApiModelProperty(value = "金蝶物料id", required = true, notes = "必填，编辑状态不允许修改")
    private String materialId;

    @ApiModelProperty(value = "产品型号")
    private String productModel;

    @ApiModelProperty(value = "套机编码")
    private String productNumber;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建人名称")
    private String createName;

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

    @ApiModelProperty(value = "更新人名称")
    private String updateBy;

    @ApiModelProperty(value = "更新人名称")
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Valid
    @NotEmpty(message = "关联明细不能空")
    @Size(min = 1, message = "关联明细不能长度少于1")
    @ApiModelProperty(value = "关联明细")
    private List<ProductComposeRela> items;
}
