19 lines
950 B
C#
19 lines
950 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
public class GatewayDbContext : DbContext
|
|
{
|
|
public GatewayDbContext(DbContextOptions<GatewayDbContext> opts) : base(opts) { }
|
|
|
|
public DbSet<ReplicaPatient> Patients => Set<ReplicaPatient>();
|
|
public DbSet<ReplicaEncounter> Encounters => Set<ReplicaEncounter>();
|
|
public DbSet<ReplicaAlertThreshold> AlertThresholds => Set<ReplicaAlertThreshold>();
|
|
public DbSet<LocalObservation> Observations => Set<LocalObservation>();
|
|
public DbSet<LocalClinicalAlert> ClinicalAlerts => Set<LocalClinicalAlert>();
|
|
public DbSet<BufferedSyncItem> BufferedSyncItems => Set<BufferedSyncItem>();
|
|
public DbSet<SyncOutboxEntry> SyncOutbox => Set<SyncOutboxEntry>();
|
|
public DbSet<GatewaySyncState> SyncState => Set<GatewaySyncState>();
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder) =>
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(GatewayDbContext).Assembly);
|
|
}
|