Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment #418

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add comment model
mara1esh committed Apr 4, 2019
commit afc5f34f4021f0795666e502a239aced69c2c5b5
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -41,12 +41,14 @@
"intl-locales-supported": "^1.0.0",
"isomorphic-fetch": "^2.2.1",
"limax": "^1.3.0",
"moment": "^2.24.0",
"mongoose": "^4.4.20",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-helmet": "^5.2.0",
"react-intl": "^2.1.2",
"react-moment": "^0.8.4",
"react-redux": "^4.4.5",
"react-router": "^3.2.1",
"redux": "^3.5.2",
12 changes: 12 additions & 0 deletions server/models/comment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import mongoose from 'mongoose';
const Schema = mongoose.Schema;

const commentSchema = new Schema({
name: { type: String, required: true },
text: { type: String, required: true },
cuid: { type: String, required: true },
post: { type: String, required: true },
date: { type: 'Date', default: Date.now, required: true },
});

export default mongoose.model('Comment', commentSchema);