Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. hooks: {
  2. beforeCreate: (instance, options) => {
  3. instance.dataValues.createdAt = Math.floor(Date.now() / 1000);
  4. instance.dataValues.updatedAt = Math.floor(Date.now() / 1000);
  5. },
  6. beforeUpdate: (instance, options) => {
  7. instance.dataValues.updatedAt = Math.floor(Date.now() / 1000);
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement