Skip to content

Instantly share code, notes, and snippets.

@rdemorais
Created June 19, 2017 13:35
Show Gist options
  • Save rdemorais/99fe538234a5320b7c2961a8d42b3d03 to your computer and use it in GitHub Desktop.
Save rdemorais/99fe538234a5320b7c2961a8d42b3d03 to your computer and use it in GitHub Desktop.
Rename timestamp sequelize
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