Created
July 7, 2018 20:40
-
-
Save itto-ki/a61bca482b6fdd5c5602164d9d56c378 to your computer and use it in GitHub Desktop.
This file contains 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
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var Article = new Schema({ | |
title: String, | |
content: String, | |
created_at: { | |
type: Date, | |
default: Date.now | |
}, | |
last_modified_at: { | |
type: Date, | |
default: Date.now | |
} | |
}); | |
module.exports = mongoose.model('Article', Article); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment