Last active
December 14, 2016 15:58
-
-
Save ronal2do/81de857befa27f0479be2a60bc6d2941 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @flow | |
| import mongoose from 'mongoose'; | |
| const Schema = new mongoose.Schema({ | |
| title: { | |
| type: String, | |
| required: true | |
| }, | |
| text: { | |
| type: String, | |
| required: true, | |
| }, | |
| }, { | |
| timestamps: { | |
| createdAt: 'createdAt', | |
| updatedAt: 'updatedAt', | |
| }, | |
| collection: 'post', | |
| }); | |
| export default mongoose.model('Post', Schema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment