1
This commit is contained in:
@@ -30,6 +30,12 @@ module.exports = (db) => {
|
||||
type: Sequelize.JSON,
|
||||
allowNull: true,
|
||||
},
|
||||
// 表字段存在且非空无默认时,须由模型声明,否则 insert 缺列报错
|
||||
created_at: {
|
||||
type: Sequelize.DATE,
|
||||
allowNull: false,
|
||||
defaultValue: Sequelize.NOW,
|
||||
},
|
||||
},
|
||||
{
|
||||
tableName: "biz_audit_log",
|
||||
|
||||
@@ -13,6 +13,7 @@ async function logAudit(p) {
|
||||
resource_type: p.resource_type || "",
|
||||
resource_id: p.resource_id != null ? p.resource_id : null,
|
||||
detail: p.detail || null,
|
||||
created_at: new Date(),
|
||||
});
|
||||
} catch (e) {
|
||||
logs.error("[biz_audit] 写入失败", e);
|
||||
|
||||
Reference in New Issue
Block a user