package com.prolog.eis.dto.page;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @desc:
 * @author: zhangJie
 * @date: 2023/7/14 16:48
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PickOrderLockReqDto {
    @ApiModelProperty("组单id")
    @NotNull(message = "组单id不能为空")
    private Integer pickId;
    @ApiModelProperty("控制 1暂停 0继续")
    @NotNull(message = "控制状态不能为空")
    @Min(value = 0,message = "控制状态最小不能超过0")
    @Max(value = 1,message = "控制状态最大不能超过1")
    private Integer type;

    public String getTypeMsg() {
        return type == 0 ? "继续" : "暂停";
    }

}
