mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
25 lines
808 B
C#
25 lines
808 B
C#
using CleanArchitecture.Domain.DomainEvents;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace CleanArchitecture.Infrastructure.Configurations.EventSourcing;
|
|
|
|
public sealed class StoredDomainEventConfiguration : IEntityTypeConfiguration<StoredDomainEvent>
|
|
{
|
|
public void Configure(EntityTypeBuilder<StoredDomainEvent> builder)
|
|
{
|
|
builder.Property(c => c.Timestamp)
|
|
.HasColumnName("CreationDate");
|
|
|
|
builder.Property(c => c.MessageType)
|
|
.HasColumnName("Action")
|
|
.HasColumnType("varchar(100)");
|
|
|
|
builder.Property(c => c.CorrelationId)
|
|
.HasMaxLength(100);
|
|
|
|
builder.Property(c => c.User)
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
}
|
|
} |