Created
June 19, 2017 13:35
-
-
Save rdemorais/99fe538234a5320b7c2961a8d42b3d03 to your computer and use it in GitHub Desktop.
Rename timestamp sequelize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (sequelize, DataTypes) { | |
var AlunoCaso = sequelize.define('AlunoCaso', { | |
dtCriacao: {type: DataTypes.DATEONLY, allowNull: false, field: 'dt_cricao'}, | |
dtAtualizacao: {type: DataTypes.DATEONLY, allowNull: false, field: 'dt_atualizacao'} | |
}, | |
{ | |
createdAt: 'dtCriacao', | |
updatedAt: 'dtAtualizacao', | |
timestamps: true, | |
tableName: 'tb_syn_aluno_caso' | |
}); | |
return AlunoCaso; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment