zgo/backend/models/post.js

9 lines
213 B
JavaScript
Raw Normal View History

2021-10-15 19:14:49 +00:00
const mongoose = require('mongoose');
const postSchema = mongoose.Schema({
title: {type: String, required:true},
content: {type: String, required:true}
});
module.exports = mongoose.model('Post', postSchema);