loopback-timestamps
v0.0.1
Published
Add created_at and updated_at in loopback mongodb models
Maintainers
Readme
loopback-denormalize
Add created_at and updated_at fields in loopback mongodb models
Install
- Add
"loopback-timestamps": "latest"to yourpackage.jsonfile then runnpm installOR runnpm install loopback-timestamps - Set the module in your Entity.js
Sample: Product Entity.
require('loopback-timestamps')(Product);Info
Methods added to your entity
- Before Save observer who automatically update or create
created_atandupdated_atfields
Enjoy ;)
