This commit is contained in:
15
backend/src/models/Note.js
Normal file
15
backend/src/models/Note.js
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
},
|
||||
date: { type: Date, default: Date.now }
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Note', NoteSchema);
|
||||
Reference in New Issue
Block a user