21 lines
598 B
C#
21 lines
598 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using RecNet.Domain.Entities.Configuration;
|
|
|
|
namespace RecNet.Infrastructure.Persistence.Configurations;
|
|
|
|
public class ServerConfigConfiguration : IEntityTypeConfiguration<ServerConfig>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ServerConfig> builder)
|
|
{
|
|
builder.HasKey(x => x.Key);
|
|
|
|
builder.Property(x => x.Key)
|
|
.HasMaxLength(128)
|
|
.IsRequired();
|
|
|
|
builder.Property(x => x.Value)
|
|
.HasColumnType("jsonb")
|
|
.IsRequired();
|
|
}
|
|
} |