package com.ruoyi.demo.entity.vo;

import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.demo.entity.PlanItem;
import lombok.Data;

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

@Data
public class PlanItemVo {
    @NotBlank(groups = {EditGroup.class},message = "itemId不能为空")
    private String itemId;
    private String equipmentId;
    private String equipmentName;
    private String equipmentCode;
    private String addrInfo;
    private String addrCode;
    private String addrCodeInfo;
    private String qrCode;
    @NotNull(groups = {EditGroup.class},message = "排序不能为空")
    private Integer sort;

    public PlanItemVo(){}
    public PlanItemVo(PlanItem item){
        this.equipmentId = item.getEquipmentId();
        this.equipmentName = item.getEquipmentName();
        this.equipmentCode = item.getEquipmentCode();
        this.addrInfo = item.getAddrInfo();
        this.addrCode = item.getAddrCode();
        this.addrCodeInfo = item.getAddrCodeInfo();
        this.qrCode = item.getQrCode();
        this.sort = item.getSort();
    }
}
