drudge / mongoose-timestamp

Adds createdAt and updatedAt date attributes that get auto-assigned to the most recent create/update timestamp
Other
308 stars 64 forks source link

created_at #43

Open mthomsit opened 7 years ago

ndelvalle commented 6 years ago

@mthomsit according to the readme, you can specify custom property names by passing them in as options like this:

mongoose.plugin(timestamps,  {
  createdAt: 'created_at',
  updatedAt: 'updated_at'
});