using SqlSugar;
using System.ComponentModel.DataAnnotations;
namespace DMS.Infrastructure.Entities
{
///
/// 邮件日志数据库实体
///
[SugarTable("email_logs")]
public class DbEmailLog
{
///
/// 日志ID
///
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
///
/// 关联的邮件ID
///
public int EmailMessageId { get; set; }
///
/// 日志级别
///
[SugarColumn(Length = 20)]
public string Level { get; set; }
///
/// 日志消息
///
[SugarColumn(Length = 4000)]
public string Message { get; set; }
///
/// 异常详情
///
[SugarColumn(Length = 2000, IsNullable = true)]
public string? Exception { get; set; }
///
/// 创建时间
///
public DateTime CreatedAt { get; set; } = DateTime.Now;
}
}