zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Infrastructure/IntegrationEvents/IntegrationEventLogConfiguration.cs

20 lines
872 B
C#
Raw Permalink Normal View History

2023-12-05 09:22:48 +00:00
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace ZeroFramework.DeviceCenter.Infrastructure.IntegrationEvents
{
public class IntegrationEventLogConfiguration : IEntityTypeConfiguration<IntegrationEventLog>
{
public void Configure(EntityTypeBuilder<IntegrationEventLog> builder)
{
builder.ToTable("IntegrationEventLogs", Constants.DbConstants.DefaultTableSchema);
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).IsRequired();
builder.Property(e => e.Content).IsRequired();
builder.Property(e => e.CreationTime).IsRequired();
builder.Property(e => e.Status).IsRequired();
builder.Property(e => e.TimesSent).IsRequired();
builder.Property(e => e.EventTypeName).IsRequired();
}
}
}