1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const Sequelize = require("sequelize");
|
||||
|
||||
module.exports = (db) => {
|
||||
return db.define(
|
||||
const biz_audit_log = db.define(
|
||||
"biz_audit_log",
|
||||
{
|
||||
id: {
|
||||
@@ -44,11 +44,8 @@ module.exports = (db) => {
|
||||
timestamps: false,
|
||||
underscored: true,
|
||||
comment: "审计日志",
|
||||
hooks: {
|
||||
beforeCreate(row) {
|
||||
if (!row.created_at) row.created_at = new Date();
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// biz_audit_log.sync({ alter: true });
|
||||
return biz_audit_log;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user