- Shipped
- July 4, 2026 at 2:20 PM UTC
- Author
- Kamo
- Commit
- 51ce021
Owner directive: images can be attached directly to a mortgage loan, always with a relevant doc type. Append LOAN to ImageAssocType (id 11, bucket imaging-loans), mirroring the ACCOUNT document-collection flags: isAllowDocType=true + isAllowDocTypeOpt=false, so a loan document's doc type is required and NOT org- optional. Add requiresDocType() (isAllowDocType && !isAllowDocTypeOpt) so upload paths enforce 'always a doc type'. Persistence-safe with NO KI/schema change: Img.assocId has no @Enumerated (defaults to ORDINAL) and there is no CHECK constraint, so appending at the END preserves every existing row's ordinal (a test guards LOAN-is-last). 3 tests green. Coordinated follow-up (flagged): (1) provision the imaging-loans MinIO bucket via KlusterServices before the first loan-doc upload; (2) rebuild the ImageAssocType consumers (DocsService does values()[id] — must know LOAN before a LOAN id arrives: **************** pick it up on their next CI build); (3) enforce requiresDocType() at the loan-doc upload save path.