package cn.reghao.devops.mgr.machine.model.po;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Lob;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author reghao
 * @date 2021-07-07 17:30:12
 */
@Setter
@Getter
@Embeddable
public class SshAuth {
    @NotBlank(message = "IPv4 地址为空白字符串")
    private String ipv4;
    @NotNull
    @Positive(message = "SSH 端口必须有效")
    private Integer port;
    private String username;
    private String password;
    @Lob
    @Column(columnDefinition="text")
    private String rsaPrikey;
}
