Created
April 29, 2019 13:33
-
-
Save beaucarnes/8372fe153a55acc1b8b0997f860b9ebf 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
| const mongoose = require('mongoose'); | |
| const Schema = mongoose.Schema; | |
| const exerciseSchema = new Schema({ | |
| username: { type: String, required: true }, | |
| description: { type: String, required: true }, | |
| duration: { type: Number, required: true }, | |
| date: { type: Date, required: true }, | |
| }, { | |
| timestamps: true, | |
| }); | |
| const Exercise = mongoose.model('Exercise', exerciseSchema); | |
| module.exports = Exercise; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment