async () => {
let t;
try {
t = await sequelize.transaction({ autocommit: true});
let _user = await User.create({}, {t});
let _userInfo = await UserInfo.create({}, {t});
t.afterCommit((t) => {
_user.setUserInfo(_userInfo);
// other logic
});
} catch (err) {
throw err;
}
}