在Sequelize中添加用户ID作为审核字段的最佳方法是什么?我想捕获创建,更新或删除记录的任何人的用户ID。例如:
{
tableName: 'user_profile',
schema: 'authentication',
timestamps: true,
paranoid: true,
auditUser: '_u',
createdAt: '_c',
updatedAt: '_v',
deletedAt: '_d'
}
......或......
{
tableName: 'user_profile',
schema: 'authentication',
timestamps: true,
paranoid: true,
createdBy: '_cu',
createdAt: '_c',
updatedBy: '_vu',
updatedAt: '_v',
deletedBy: '_du',
deletedAt: '_d'
}