loopback-timestamps
v0.0.1
Published
Add created_at and updated_at in loopback mongodb models
Downloads
8
Maintainers
Readme
loopback-denormalize
Add created_at
and updated_at
fields in loopback mongodb models
Install
- Add
"loopback-timestamps": "latest"
to yourpackage.json
file then runnpm install
OR 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_at
andupdated_at
fields
Enjoy ;)