DTOs: - EmailProfileDto: Profile data transfer object - EmailAccountDto: Email account data transfer object - EmailHistoryDto: Email history data transfer object - EmailAttachmentDto: Attachment data transfer object Dependencies: - MediatR 14.2.0 for CQRS (Commands/Queries) - AutoMapper 12.0.1 for entity-DTO mapping - FluentValidation 12.1.1 for input validation This provides the foundation for the application layer implementation.
55 lines
1.9 KiB
C#
55 lines
1.9 KiB
C#
namespace DigitalData.EmailProfiler.Application.Common.Dtos;
|
|
|
|
public class EmailProfileDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string ProfileName { get; set; } = string.Empty;
|
|
public int EmailAccountId { get; set; }
|
|
public string? EmailAccountName { get; set; }
|
|
public int? ProcessId { get; set; }
|
|
public string? ProcessName { get; set; }
|
|
public int PollIntervalMinutes { get; set; }
|
|
public DateTime? LastPollTime { get; set; }
|
|
public bool IsActive { get; set; }
|
|
public string? Comment { get; set; }
|
|
}
|
|
|
|
public class EmailAccountDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string AccountName { get; set; } = string.Empty;
|
|
public string ImapServer { get; set; } = string.Empty;
|
|
public int ImapPort { get; set; }
|
|
public string SmtpServer { get; set; } = string.Empty;
|
|
public int SmtpPort { get; set; }
|
|
public string Username { get; set; } = string.Empty;
|
|
public bool UseOAuth2 { get; set; }
|
|
public bool IsActive { get; set; }
|
|
}
|
|
|
|
public class EmailHistoryDto
|
|
{
|
|
public int Id { get; set; }
|
|
public int? ProfileId { get; set; }
|
|
public string? ProfileName { get; set; }
|
|
public string? SenderAddress { get; set; }
|
|
public string? Subject { get; set; }
|
|
public DateTime? EmailDate { get; set; }
|
|
public DateTime? ProcessedDate { get; set; }
|
|
public string? Status { get; set; }
|
|
public int? ErrorCodeValue { get; set; }
|
|
public string? ErrorMessage { get; set; }
|
|
public List<EmailAttachmentDto> Attachments { get; set; } = new();
|
|
}
|
|
|
|
public class EmailAttachmentDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string OriginalFileName { get; set; } = string.Empty;
|
|
public string FilePath { get; set; } = string.Empty;
|
|
public long FileSize { get; set; }
|
|
public bool IsEmbeddedFile { get; set; }
|
|
public string? Status { get; set; }
|
|
public string? ValidationErrorMessage { get; set; }
|
|
}
|