permit and processed collection updates
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import z from "zod";
|
||||
import mongoose from "mongoose";
|
||||
import { pageQueryParams } from "../pagination";
|
||||
import { buildJsonSchemas } from "fastify-zod";
|
||||
@@ -74,9 +75,23 @@ export const processedModel = mongoose.model(
|
||||
"processed"
|
||||
);
|
||||
|
||||
const updateProcessedInput = z.object({
|
||||
manualStatus: z
|
||||
.enum(["Ready To Issue", "Issued", "Invoiced", "Paid", "Closed"])
|
||||
.nullable()
|
||||
.optional(),
|
||||
utility: z
|
||||
.enum(["Submitted", "Pending", "Applied", "Rejected", "Paid"])
|
||||
.nullable()
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type UpdateProcessedInput = z.infer<typeof updateProcessedInput>;
|
||||
|
||||
export const { schemas: processedSchemas, $ref: $processed } = buildJsonSchemas(
|
||||
{
|
||||
pageQueryParams,
|
||||
updateProcessedInput,
|
||||
},
|
||||
{ $id: "processed" }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user