摘要: 1.验证枚举类型 var schema = { "properties": { "data": { "type": "object", "required": ["code", "status", "message", "data", "token"], "properties": { "code" 阅读全文
posted @ 2021-08-28 16:52 江山一族 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 1.事务 try { const transaction = await sequelize.transaction(); const user = await User.findOne(..., { transaction }); await user.update(..., { transact 阅读全文
posted @ 2021-08-28 16:44 江山一族 阅读(165) 评论(0) 推荐(0) 编辑