直接使用Sequelize虽然可以,但是存在一些问题。
团队开发时,有人喜欢自己加timestamp:
var Pet = sequelize.define(‘pet‘, { id: { type: Sequelize.STRING(50), primaryKey: true }, name: Sequelize.STRING(100), createdAt: Sequelize.BIGINT, updatedAt: Sequelize.BIGINT }, { timestamps: false });
有人又喜欢自增主键,并且自定义表名:
原文:https://www.cnblogs.com/Rivend/p/12232923.html