feature: Draft Data Entry

This commit is contained in:
voltsrage
2026-06-26 05:04:39 +08:00
parent f74f8f471f
commit 7121520926
20 changed files with 2033 additions and 2 deletions
@@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
public static class DbResetHelper
{
// Truncate all data between tests — faster than dropping and re-creating
// the database, and preserves the schema (migrations do not re-run).
public static async Task ResetAsync(AppDbContext db)
{
await db.Database.ExecuteSqlRawAsync(@"
TRUNCATE TABLE digitization_events, draft_observations,
draft_encounters, draft_patients,
scanned_documents, digitization_batches, users
RESTART IDENTITY CASCADE;
");
}
}