add assignedTo field to rts

This commit is contained in:
2025-05-06 10:14:40 +05:30
parent f224d05a36
commit c7e6b209e9
2 changed files with 27 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ const rtsSchema = new mongoose.Schema({
type: mongoose.Types.ObjectId,
ref: "user",
},
assignedTo: {
type: mongoose.Types.ObjectId,
ref: "user",
},
});
export const rtsFields = Object.keys(rtsSchema.paths).filter(
@@ -70,6 +74,7 @@ const rtsCreateInput = z.object({
currentStage: z.number(),
})
.optional(),
assignedTo: z.string().optional(),
});
const rtsUpdateInput = z.object({
@@ -88,6 +93,7 @@ const rtsUpdateInput = z.object({
currentStage: z.number(),
})
.optional(),
assignedTo: z.string().optional(),
});
const rtsNewUpload = z.object({