Skip to content

Instantly share code, notes, and snippets.

@itto-ki
Created July 7, 2018 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itto-ki/a61bca482b6fdd5c5602164d9d56c378 to your computer and use it in GitHub Desktop.
Save itto-ki/a61bca482b6fdd5c5602164d9d56c378 to your computer and use it in GitHub Desktop.
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