fix claim validation and expert branch scoping

This commit is contained in:
SepehrYahyaee
2026-09-20 15:00:46 +03:30
parent 4ef53f2cc9
commit e06178f804
13 changed files with 640 additions and 29 deletions

View File

@@ -239,6 +239,10 @@ export class ClaimCase {
@Prop({ type: Types.ObjectId, index: true })
initiatedByFieldExpertId?: Types.ObjectId;
/** Branch snapshot inherited from the originating expert-created blame. */
@Prop({ type: Types.ObjectId, index: true })
branchId?: Types.ObjectId;
/**
* The damaged party's userId, resolved from the blame at claim-creation time.
* Stored here so view/list access does not require an extra blame lookup.