refinement phase 9

This commit is contained in:
hamid
2026-07-13 22:52:57 +03:30
parent ef3024ef2f
commit 70fb0a9202
32 changed files with 6945 additions and 113 deletions
@@ -179,5 +179,15 @@ public class ApplicationDbContext: IdentityDbContext<User, Role, int, UserClaim,
{
builder.Property(c => c.SettlementIban).HasConversion(encrypted);
});
// refinement-phase-9 §9.5: ticket message bodies are the refund/dispute paper trail — users type phone
// numbers, addresses and clinical detail into them — so they are encrypted at rest through the same seam.
// The plaintext-length limit (4000) stays a boundary-validation rule; the stored ciphertext column is
// widened to nvarchar(max) in TicketMessageConfig. Body is never a search/filter predicate (the admin
// thread read decrypts per row), so losing SQL-searchability on it is an accepted trade-off.
modelBuilder.Entity<Baya.Domain.Entities.Messaging.TicketMessage>(builder =>
{
builder.Property(m => m.Body).HasConversion(encrypted);
});
}
}