Update document template schema to reference object types
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good

- Changed the type of `testObject` from Mixed to ObjectId and added a refPath to `objectType`, enhancing the schema's ability to manage relationships with other documents.
- This update improves data integrity and allows for more structured querying of related objects.
This commit is contained in:
Tom Butcher 2026-08-22 12:56:03 +01:00
parent 4fca989b04
commit f5e74ac471

View File

@ -45,7 +45,8 @@ const documentTemplateSchema = new Schema(
default: '<Container></Container>', default: '<Container></Container>',
}, },
testObject: { testObject: {
type: Schema.Types.Mixed, type: Schema.Types.ObjectId,
refPath: 'objectType',
required: false, required: false,
}, },
}, },