created changes endpoint
This commit is contained in:
@@ -156,6 +156,21 @@ const updatePermitInput = z.object({
|
||||
export type CreatePermitInput = z.infer<typeof createPermitInput>;
|
||||
export type UpdatePermitInput = z.infer<typeof updatePermitInput>;
|
||||
|
||||
export const changesModel = mongoose.model(
|
||||
"change",
|
||||
new mongoose.Schema({
|
||||
tenantId: String,
|
||||
permitId: String,
|
||||
field: String,
|
||||
value: String,
|
||||
updatedBy: {
|
||||
type: mongoose.Types.ObjectId,
|
||||
ref: "user",
|
||||
},
|
||||
updatedAt: Date,
|
||||
})
|
||||
);
|
||||
|
||||
export const { schemas: permitSchemas, $ref: $permit } = buildJsonSchemas(
|
||||
{
|
||||
createPermitInput,
|
||||
|
||||
Reference in New Issue
Block a user