Untitled
Anonymous
plain_text
02/28/2023 9:17 AM
932 B
23
Indexable
import mongoose from 'mongoose';
const schema = {
snapshot_id: {
type: String,
required: true
},
annotated_by: {
type: Array,
of: String,
required: true,
default: []
},
original_image_height: {
type: Number,
required: true
},
original_image_width: {
type: Number,
required: true
},
annotations: {
type: Array,
default: [],
required: true
},
created: {
type: Date,
required: true
}
}
let annotationSchema = mongoose.Schema(schema);
export default mongoose.model('Annotation', annotationSchema);Editor is loading...