sequelize使用NOW作为默认值插入一个时间,结果报错:nodejs.SequelizeDatabaseError: Conversion failed when converting date and/or time from character string.
const {STRING, INTEGER, TEXT, DATE, NOW} = app.Sequelize;
const LoginLogs = app.model.define('wz_AdminLoginLogs', {
ID: {type: INTEGER, primaryKey: true, autoIncrement: true},
Username: STRING,
LoginIp: STRING,
Content: TEXT,
LastLoginTime: {type: DATE, defaultValue: NOW},
});
这是代码,到底是哪里出错了呢?