Validation for prices and objection

This commit is contained in:
SepehrYahyaee
2026-05-20 11:08:47 +03:30
parent 511d478064
commit e4dfe7c572
18 changed files with 467 additions and 60 deletions

View File

@@ -141,8 +141,8 @@ export const ClaimExpertReplySchema =
/** One line item the user disputes on an expert-priced part */
@Schema({ _id: false })
export class ClaimUserObjectionPart {
@Prop({ type: String, required: true })
partId: string;
@Prop({ type: Number, required: true })
partId: number;
@Prop({ type: String })
reason?: string;
@@ -167,8 +167,9 @@ export const ClaimUserObjectionPartSchema =
@Schema({ _id: false })
export class ClaimUserObjectionNewPart {
@Prop({ type: String })
partId?: string;
/** Catalog id when known; otherwise a generated string id for the new line. */
@Prop({ type: MongooseSchema.Types.Mixed })
partId?: number | string;
@Prop({ type: String, required: true })
partName: string;