Added sign endpoint for claim

This commit is contained in:
2026-04-30 13:17:23 +03:30
parent bffb8a3b97
commit a9846095c1
3 changed files with 243 additions and 0 deletions

View File

@@ -76,6 +76,21 @@ export class ClaimUserComment {
export const ClaimUserCommentSchema =
SchemaFactory.createForClass(ClaimUserComment);
/** Owner acceptance + signature after expert pricing (WAITING_FOR_INSURER_APPROVAL @ INSURER_REVIEW). */
@Schema({ _id: false })
export class ClaimOwnerInsurerApproval {
@Prop({ type: Boolean, required: true })
agree: boolean;
@Prop({ type: Types.ObjectId })
signDetailId?: Types.ObjectId;
@Prop({ type: Date, default: () => new Date() })
signedAt?: Date;
}
export const ClaimOwnerInsurerApprovalSchema =
SchemaFactory.createForClass(ClaimOwnerInsurerApproval);
@Schema({ _id: false })
export class ClaimExpertReply {
@Prop({ type: String })
@@ -254,6 +269,9 @@ export class ClaimEvaluation {
@Prop({ type: ClaimFileRatingSchema })
rating?: ClaimFileRating;
@Prop({ type: ClaimOwnerInsurerApprovalSchema })
ownerInsurerApproval?: ClaimOwnerInsurerApproval;
@Prop({ type: String })
visitLocation?: string;