Outbox pattern table added

This commit is contained in:
2026-01-27 20:15:17 +01:00
Unverified
parent 49e6c8a643
commit 09b7bb8bef
9 changed files with 280 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TimetableDesigner.Backend.Services.Authentication.Database.Model;
namespace TimetableDesigner.Backend.Services.Authentication.Database.Configuration;
public class EventConfiguration : IEntityTypeConfiguration<Event>
{
public void Configure(EntityTypeBuilder<Event> builder)
{
builder.HasKey(x => x.Id);
builder.HasIndex(x => x.Id)
.IsUnique();
builder.Property(x => x.Id)
.IsRequired();
builder.Property(x => x.Payload)
.IsRequired();
builder.Property(x => x.PayloadType)
.IsRequired();
builder.Property(x => x.OccuredOn)
.IsRequired();
builder.Property(x => x.ProcessedOn);
builder.Property(x => x.RetryCount)
.IsRequired();
builder.Property(b => b.Version)
.IsRowVersion();
}
}