backend phase 9
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Reflection;
|
||||
using Baya.Application.Contracts.Common;
|
||||
using Baya.Domain.Common;
|
||||
using Baya.Domain.Entities.Booking;
|
||||
using Baya.Domain.Entities.Identity;
|
||||
using Baya.Domain.Entities.User;
|
||||
using Baya.Domain.Entities.Verification;
|
||||
@@ -139,5 +140,22 @@ public class ApplicationDbContext: IdentityDbContext<User, Role, int, UserClaim,
|
||||
{
|
||||
builder.Property(c => c.CredentialNumber).HasConversion(encrypted);
|
||||
});
|
||||
|
||||
// b9 snapshot + clinical PII: the frozen address snapshot and every booking_care_instructions field
|
||||
// are encrypted at rest through the same seam. The care fields are the stage-2 clinical disclosure —
|
||||
// decrypted only in the gated care-instructions read (assigned nurse + admin, post-confirmation).
|
||||
modelBuilder.Entity<Booking>(builder =>
|
||||
{
|
||||
builder.Property(b => b.AddressSnapshotJson).HasConversion(encrypted);
|
||||
});
|
||||
modelBuilder.Entity<BookingCareInstruction>(builder =>
|
||||
{
|
||||
builder.Property(c => c.CurrentConditions).HasConversion(encrypted);
|
||||
builder.Property(c => c.Medications).HasConversion(encrypted);
|
||||
builder.Property(c => c.Allergies).HasConversion(encrypted);
|
||||
builder.Property(c => c.SpecialInstructions).HasConversion(encrypted);
|
||||
builder.Property(c => c.EmergencyContactName).HasConversion(encrypted);
|
||||
builder.Property(c => c.EmergencyContactPhone).HasConversion(encrypted);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user