feature: Ward Gateway Service (Local-First Clinical Path)

This commit is contained in:
voltsrage
2026-06-23 16:45:38 +08:00
parent d8e142fffe
commit 1bf8359097
100 changed files with 5474 additions and 4 deletions
@@ -0,0 +1,23 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
public class SyncOutboxEntryConfiguration : IEntityTypeConfiguration<SyncOutboxEntry>
{
public void Configure(EntityTypeBuilder<SyncOutboxEntry> builder)
{
builder.ToTable("sync_outbox");
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).HasColumnName("id").HasDefaultValueSql("gen_random_uuid()");
builder.Property(e => e.BatchId).HasColumnName("batch_id");
builder.Property(e => e.Status)
.HasColumnName("status")
.HasMaxLength(16)
.HasConversion(
v => v.ToDbString(),
v => SyncOutboxStatusExtensions.FromDbString(v))
.HasDefaultValueSql("'PENDING'")
.HasSentinel((SyncOutboxStatus)(-1));
builder.Property(e => e.CreatedAt).HasColumnName("created_at").HasDefaultValueSql("NOW()");
builder.Property(e => e.SubmittedAt).HasColumnName("submitted_at");
}
}