Spaces:
Running
Running
| const mongoose = require('mongoose'); | |
| const RefinityAnnotationSchema = new mongoose.Schema({ | |
| versionId: { type: mongoose.Schema.Types.ObjectId, ref: 'RefinityVersion', required: true }, | |
| start: { type: Number, required: true }, | |
| end: { type: Number, required: true }, | |
| category: { type: String, required: true }, | |
| comment: { type: String }, | |
| correction: { type: String }, | |
| createdBy: { type: String }, // Optional: username who created the annotation | |
| }, { timestamps: true }); | |
| module.exports = mongoose.model('RefinityAnnotation', RefinityAnnotationSchema); | |