diff options
author | 2021-08-09 21:36:03 +0200 | |
---|---|---|
committer | 2021-08-09 21:37:03 +0200 | |
commit | 464e470441287572cfda8d95484f781236b9db35 (patch) | |
tree | 87177837cb6ee6ee000f0d39fa5ba7ee6bb2943e /models/Note.js | |
download | my_apps-464e470441287572cfda8d95484f781236b9db35.tar.gz my_apps-464e470441287572cfda8d95484f781236b9db35.tar.bz2 my_apps-464e470441287572cfda8d95484f781236b9db35.zip |
init commit
Diffstat (limited to 'models/Note.js')
-rw-r--r-- | models/Note.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/models/Note.js b/models/Note.js new file mode 100644 index 0000000..1790c91 --- /dev/null +++ b/models/Note.js @@ -0,0 +1,9 @@ +const mongoose = require('mongoose') + +const noteSchema = new mongoose.Schema({ + content: {type: String, required: true, minlength: 1}, +}); + +const Note = mongoose.models.Note || mongoose.model('Note', noteSchema) + +export default Note |