package cn.reghao.tnb.file.app.zoss.model.dto;

import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/**
 * @author reghao
 * @date 2024-02-27 09:42:44
 */
@Setter
@Getter
public class NodeAddDto {
    @NotNull
    private Integer storeNodeId;
    @Pattern(regexp = "^[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,6}$", message = "域名格式不正确")
    @Size(max = 128, message = "域名长度应小于 128 个字符")
    private String domain;
    @NotBlank
    @Size(max = 5, message = "协议应该是 http 或 https")
    private String protocol;
}
