package com.admin.common.dto;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.Max;

@Data
public class ForwardUpdateDto {
    
    @NotNull(message = "ID不能为空")
    private Long id;
    
    @NotNull(message = "用户ID不能为空")
    private Integer userId;
    
    @NotBlank(message = "转发名称不能为空")
    private String name;

    @NotBlank(message = "远程地址不能为空")
    private String remoteAddr;

    private String strategy;

    private Integer inPort;

    @Min(value = 0, message = "流量限制不能小于0")
    private Long flowLimit;

    @Min(value = 0, message = "到期时间不能小于0")
    private Long expTime;

    @Min(value = 0, message = "设备限制不能小于0")
    private Integer deviceLimit;

    @Min(value = 0, message = "释放时间不能小于0")
    @Max(value = 10080, message = "释放时间不能超过10080分钟")
    private Integer deviceReleaseMinutes;

}
