package com.auth.dao.base.entity;

import com.auth.common.model.common.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_email_config")
@Schema(name = "EmailConfig-系统邮件服务器配置实体类对象", title = "系统邮件服务器配置", description = "系统邮件服务器配置的实体类对象")
public class EmailConfigEntity extends BaseEntity {

    @Schema(name = "configName", title = "配置名称")
    private String configName;

    @Schema(name = "email", title = "发件邮箱")
    private String email;

    @Schema(name = "username", title = "发件人名称")
    private String username;

    @Schema(name = "password", title = "邮箱密码/授权码")
    private String password;

    @Schema(name = "host", title = "SMTP服务器地址")
    private String host;

    @Schema(name = "port", title = "SMTP端口")
    private Integer port;

    @Schema(name = "protocol", title = "协议类型(smtp/pop3/imap)")
    private String protocol;

    @Schema(name = "sslEnable", title = "是否启用SSL(0=否,1=是)")
    private Boolean sslEnable;

    @Schema(name = "isDefault", title = "是否默认配置(0=否,1=是)")
    private Boolean isDefault;

    @Schema(name = "testStatus", title = "测试状态(0=失败,1=成功)")
    private Integer testStatus;

    @Schema(name = "testTime", title = "最后测试时间")
    private LocalDateTime testTime;

    @Schema(name = "isDeleted", title = "逻辑删除(0=未删除,1=已删除)")
    private Boolean isDeleted;

}