Untitled

 avatar
unknown
plain_text
2 years ago
698 B
7
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...