feat: make assignedTo field accept multiple values for all collections
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import z from "zod";
|
||||
import mongoose from "mongoose";
|
||||
import mongoose, { Schema } from "mongoose";
|
||||
import { pageQueryParams } from "../pagination";
|
||||
import { buildJsonSchemas } from "fastify-zod";
|
||||
|
||||
@@ -38,7 +38,7 @@ const processedSchema = new mongoose.Schema({
|
||||
permitType: String,
|
||||
utility: String,
|
||||
assignedTo: {
|
||||
type: mongoose.Types.ObjectId,
|
||||
type: [Schema.Types.ObjectId],
|
||||
ref: "user",
|
||||
},
|
||||
link: String,
|
||||
@@ -131,13 +131,13 @@ const updateProcessedInput = z.object({
|
||||
block: z.string().nullable().optional(),
|
||||
jobNumber: z.string().nullable().optional(),
|
||||
startDate: z.date().nullable().optional(),
|
||||
assignedTo: z.string().nullable().optional(),
|
||||
assignedTo: z.array(z.string()).nullable().optional(),
|
||||
noc: z.string().optional(),
|
||||
deed: z.string().optional(),
|
||||
requests: z.array(z.string()).optional(),
|
||||
relatedRecords: z
|
||||
.object({
|
||||
custon_id: z.string(),
|
||||
custom_id: z.string(),
|
||||
relationship: z.string(),
|
||||
type_text: z.string(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user