const mongoose = require("mongoose") const noteListSchema = new mongoose.Schema({ notes: [{ title: { type: String, required: true, }, noteId: { type: mongoose.Schema.Types.ObjectId, ref: "Note", required: true, }, created_at: {type: Date, default: Date.now}, updated_at: {type: Date, default: Date.now} }] }) const NoteList = mongoose.models.NoteList || mongoose.model('NoteList', noteListSchema) export default NoteList