using SqlSugar; using System.ComponentModel.DataAnnotations; namespace DMS.Infrastructure.Entities { /// /// 邮件账户数据库实体 /// [SugarTable("email_accounts")] public class DbEmailAccount { /// /// 账户ID /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// /// 账户名称 /// [SugarColumn(Length = 100)] public string Name { get; set; } /// /// 邮箱地址 /// [SugarColumn(Length = 255)] public string EmailAddress { get; set; } /// /// SMTP服务器地址 /// [SugarColumn(Length = 100)] public string SmtpServer { get; set; } /// /// SMTP端口号 /// public int SmtpPort { get; set; } = 587; /// /// 是否启用SSL /// public bool EnableSsl { get; set; } = true; /// /// 用户名 /// [SugarColumn(Length = 100)] public string Username { get; set; } /// /// 密码 /// [SugarColumn(Length = 100)] public string Password { get; set; } /// /// IMAP服务器地址 /// [SugarColumn(Length = 100, IsNullable = true)] public string? ImapServer { get; set; } /// /// IMAP端口号 /// public int ImapPort { get; set; } = 993; /// /// 是否为默认账户 /// public bool IsDefault { get; set; } /// /// 是否启用 /// public bool IsActive { get; set; } = true; /// /// 创建时间 /// public DateTime CreatedAt { get; set; } = DateTime.Now; /// /// 更新时间 /// public DateTime UpdatedAt { get; set; } = DateTime.Now; } }