const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const NoteSchema = new Schema({
    title: { type: String },
    content: { type: String },
    campaign: {
        type: Schema.Types.ObjectId,
        ref: 'Campaign',
        required: true
    },
    folder: {
        type: Schema.Types.ObjectId,
        ref: 'Folder'
    },
    date: { type: Date, default: Date.now }
});

module.exports = mongoose.model('Note', NoteSchema);