package com.ruoyi.ss.store.domain;

import com.ruoyi.common.constant.DictTypeConstants;
import com.ruoyi.system.valid.DictValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
public class GateAuthDTO {

    /** 店铺id */
    @ApiModelProperty("店铺id")
    @NotNull(message = "店铺id不允许为空")
    private Long storeId;

    @ApiModelProperty("开锁方式: 1-通电开锁；2-断电开锁")
    @NotBlank(message = "开锁方式不允许为空")
    @DictValid(type = DictTypeConstants.UNLOCK_MODE, message = "非法的开锁方式")
    private String unlockMode;

    @ApiModelProperty("开锁条件：1-有当前订单可进入；2-有历史订单可恶进入；3-无条件")
    @NotBlank(message = "开锁条件不允许为空")
    @DictValid(type = DictTypeConstants.UNLOCK_CONDITION, message = "非法的开锁条件")
    private String unlockCondition;

    @ApiModelProperty("开锁时长")
    @NotNull(message = "开锁时长不允许为空")
    private Integer unlockTime;

    @ApiModelProperty("店铺码")
    private String code;

}
