zgo/backend/models/post.js

9 lines
213 B
JavaScript
Raw Normal View History

2022-04-11 14:48:34 +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);