import mongoose from 'mongoose'; const NoteSchema = new mongoose.Schema({ comment: String, sample_references: [{ id: mongoose.Schema.Types.ObjectId, relation: String }], custom_fields: mongoose.Schema.Types.Mixed }); export default mongoose.model('note', NoteSchema);