package com.njcn.advance.pojo.param.govern.voltage;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author hongawen
 * @since 2024-03-14
 */
@Data
public class SgProductLineParam  {


    /**
     * 业务用户id
     */
    @ApiModelProperty("业务用户id")
    @NotBlank(message = ValidMessage.MISS_PREFIX + "userId")
    private String userId;

    /**
     * 进线id
     */
    @ApiModelProperty("进线id")
    @NotBlank(message = ValidMessage.MISS_PREFIX + "incomingLineId")
    private String incomingLineId;

    /**
     * 生产线名称
     */
    @ApiModelProperty("生产线名称")
    @NotBlank(message = ValidMessage.MISS_PREFIX + "name")
    private String name;

    /**
     * 计算模式 0-模式一（单次中断不计算设备、原料损失）；1-模式二(计算)
     */
    @ApiModelProperty("计算模式")
    @NotNull(message = ValidMessage.MISS_PREFIX + "calcMode")
    private Integer calcMode;

    /**
     * 中断导致的产能损失（默认为0）
     */
    @ApiModelProperty("中断导致的产能损失")
    @NotNull(message = ValidMessage.MISS_PREFIX + "capacityLoss")
    private Double capacityLoss;

    /**
     * 更新操作实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class SgProductLineUpdateParam extends SgProductLineParam {

        /**
         * 表Id
         */
        @ApiModelProperty("id")
        @NotBlank(message = ValidMessage.ID_NOT_BLANK)
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
        private String id;

    }

    /**
     * 分页查询实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class SgProductLineQueryParam extends BaseParam {

        @ApiModelProperty("业务用户id")
        @NotBlank(message = ValidMessage.MISS_PREFIX + "userId")
        private String userId;

    }



}
