package com.sw.common.accessory.server.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@ApiModel(value = "设备辅材Dto")
public class EquipmentAccessoryDto {

    private Long id;
    @ApiModelProperty(value = "模块")
    String area;
    @ApiModelProperty(value = "系列")
    String series;
    @ApiModelProperty(value = "设备号")
    String equipmentCode;
    @ApiModelProperty(value = "预警数量")
    Integer earlyWarningCount;
    @ApiModelProperty(value = "待上机数量")
    Integer waitingBoardingCount;
    @ApiModelProperty(value = "上机中数量")
    Integer boardingCount;
    @ApiModelProperty(value = "退库中数量")
    Integer stockReturnCount;
    @ApiModelProperty(value = "待出库数量")
    Integer waitingOutboundCount;
    @ApiModelProperty(value = "创建/修改人", required = true)
    String userCreate;
    @ApiModelProperty(value = "创建/修改时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date gmtCreate;

    /**
     * 物料总数
     *
     * @return 物料总数
     */
    public Integer getCount() {
        return this.waitingBoardingCount + this.boardingCount + this.stockReturnCount + this.waitingOutboundCount;
    }
}