b0996833bc
- Add HrynCo.NotificationService.Contracts project with SendEmailMessage and NotificationResultMessage - Add SendEmailConsumer (RabbitMQ worker) with reply-to pattern via CorrelationContext.ReplyTo - Add SendEmailHandler owning SMTP send + usage increment as business logic - Add GetChannelUsageSummaryHandler with single DB query via navigation property - Merge usage stats inline into channels list (daily/monthly with progress bars) - Refactor AdminChannelsController.Index to use GetChannelUsageSummaryQuery - Add RabbitMQ service to docker-compose files - Remove dead AdminChannelUsageController, ChannelUsageViewModel, ChannelUsageSummary Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
25 lines
866 B
C#
25 lines
866 B
C#
using HrynCo.NotificationService.DAL.Abstract.Entities;
|
|
using HrynCo.NotificationService.DAL.Abstract.Providers;
|
|
|
|
namespace HrynCo.NotificationService.DAL.EF.Entities;
|
|
|
|
internal class EmailChannelEntity : Entity
|
|
{
|
|
public required string ServiceName { get; set; }
|
|
public int Priority { get; set; }
|
|
public EmailChannelType EmailChannelType { get; set; }
|
|
|
|
/// <summary>
|
|
/// EmailChannel-specific credentials and settings stored as JSONB.
|
|
/// Deserialized based on <see cref="EmailChannelType"/> in the repository.
|
|
/// </summary>
|
|
public required string SettingsJson { get; set; }
|
|
|
|
public int? DailyLimit { get; set; }
|
|
public int? MonthlyLimit { get; set; }
|
|
public int WarnThresholdPercent { get; set; }
|
|
public bool IsActive { get; set; }
|
|
|
|
public ICollection<EmailChannelUsageEntity> UsageRecords { get; set; } = [];
|
|
}
|