Add server configuration service and repo

This commit is contained in:
Holden
2026-06-18 13:43:59 -05:00
parent 7fc7e1dc91
commit 608def3ac8
15 changed files with 272 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
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();
}
}