Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hooks: {
- beforeCreate: (instance, options) => {
- instance.dataValues.createdAt = Math.floor(Date.now() / 1000);
- instance.dataValues.updatedAt = Math.floor(Date.now() / 1000);
- },
- beforeUpdate: (instance, options) => {
- instance.dataValues.updatedAt = Math.floor(Date.now() / 1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement