think mongoose:为ThinkJS 3.x包装猫鼬 源码
猫鼬 为ThinkJS 3.x包装猫鼬 安装 npm install think-mongoose --save 如何使用 配置扩展 更改文件src/config/extend.js (在多模块项目中,文件为src/common/config/extend.js ),添加配置: const mongoose = require ( 'think-mongoose' ) ; module . exports = [ mongoose ( think . app ) ] 当添加猫鼬扩展时,它将添加以下一些方法: think.Mongoose {Class}模型定义基类,必须扩展模型类并
下载地址
用户评论