Update to allow for seeding of database
CI / backend (push) Successful in 9m43s
CI / frontend (push) Successful in 1m52s

This commit is contained in:
2026-08-11 05:29:51 +08:00
parent 1ade75b635
commit 8b1eddb587
9 changed files with 287 additions and 7 deletions
@@ -0,0 +1,33 @@
public class SeedingOptions
{
public const string Section = "Seeding";
/// <summary>
/// Demo patients, observations, well-known *.demo users, and demo site/gateway.
/// Must stay false in production.
/// </summary>
public bool EnableDemoData { get; set; } = true;
public BootstrapUserOptions? Admin { get; set; }
public BootstrapUserOptions? Nurse { get; set; }
public BootstrapUserOptions? Physician { get; set; }
/// <summary>
/// When SiteId + GatewayId are set, ensure matching clinical_sites / ward_gateways rows exist
/// so the edge gateway can heartbeat (same IDs as Gateway__* on the ward-gateway container).
/// </summary>
public Guid? SiteId { get; set; }
public string? SiteCode { get; set; }
public string? SiteName { get; set; }
public string? SiteAddress { get; set; }
public Guid? GatewayId { get; set; }
public string? GatewayCode { get; set; }
public string? GatewayDepartment { get; set; }
}
public class BootstrapUserOptions
{
public string? Username { get; set; }
public string? Password { get; set; }
public string? DisplayName { get; set; }
}