add status field to rts

This commit is contained in:
2025-06-04 14:43:10 +05:30
parent e52df864ab
commit 83e68fd6d3
2 changed files with 4 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ const rtsSchema = new mongoose.Schema({
},
{ _id: false }
),
status: String,
createdAt: Date,
createdBy: {
type: mongoose.Types.ObjectId,
@@ -77,6 +78,7 @@ const rtsCreateInput = z.object({
})
.optional(),
assignedTo: z.string().optional(),
status: z.string().optional(),
});
const rtsUpdateInput = z.object({
@@ -97,6 +99,7 @@ const rtsUpdateInput = z.object({
})
.optional(),
assignedTo: z.string().optional(),
status: z.string().optional(),
});
const rtsNewUpload = z.object({

View File

@@ -104,6 +104,7 @@ export async function listRts(
documents: 1,
statusPipeline: 1,
createdAt: 1,
status: 1,
county: {
$let: {
vars: { county: { $arrayElemAt: ["$countyRec", 0] } },