feat: implement communications module with SMTP settings, email logging, and frontend UI
This commit is contained in:
@@ -4,6 +4,7 @@ using Zentral.Domain.Entities.Purchases;
|
||||
using Zentral.Domain.Entities.Sales;
|
||||
using Zentral.Domain.Entities.Production;
|
||||
using Zentral.Domain.Entities.HR;
|
||||
using Zentral.Domain.Entities.Communications;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Zentral.Infrastructure.Data;
|
||||
@@ -94,6 +95,9 @@ public class ZentralDbContext : DbContext
|
||||
public DbSet<Assenza> Assenze => Set<Assenza>();
|
||||
public DbSet<Pagamento> Pagamenti => Set<Pagamento>();
|
||||
public DbSet<Rimborso> Rimborsi => Set<Rimborso>();
|
||||
|
||||
// Communications module entities
|
||||
public DbSet<EmailLog> EmailLogs => Set<EmailLog>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -989,5 +993,16 @@ public class ZentralDbContext : DbContext
|
||||
.HasForeignKey(e => e.ArticleId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
// ===============================================
|
||||
// COMMUNICATIONS MODULE ENTITIES
|
||||
// ===============================================
|
||||
modelBuilder.Entity<EmailLog>(entity =>
|
||||
{
|
||||
entity.ToTable("EmailLogs");
|
||||
entity.HasIndex(e => e.SentDate);
|
||||
entity.HasIndex(e => e.Status);
|
||||
entity.HasIndex(e => e.Recipient);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user