mas-server 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "一款基于express面向中小型项目的后端框架",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -17,7 +17,19 @@
17
17
  * @property {string} sql.password 数据库密码
18
18
  * @property {string} sql.database 数据库名称
19
19
  */
20
- const { $sqlForm } = require('masmysql');
20
+ /**
21
+ * @typedef {object} sqlForm
22
+ * @property {string} key - 字段名
23
+ * @property {"str" | "int" | "float"} type 类型
24
+ * @property {string} length 字符串长度,整数或浮点数可省略
25
+ * @property {boolean} notNull 是否不能为空,默认为false
26
+ */
27
+ /**
28
+ * @desc: 数据库一键建表规范
29
+ * @param {sqlForm[]} data
30
+ * @return {sqlForm[]} 返回配置
31
+ */
32
+ const $sqlForm = (data) => data
21
33
  module.exports = {
22
34
  /**
23
35
  * @desc: 数据库规范