# 数据库文档 ### 数据表配置规范 ````json lines { "default": "tests", "connections": { "tests": { "type": "mysql", "idauto": false, "hostname": "127.0.0.1", "hostport": 3306, "database": "tests", "username": "root", "userpass": "11111111", "params": [], "charset": "utf8mb4", "prefix": "" }, "tests1": { "type": "mysql", "idauto": false, "hostname": "127.0.0.1", "hostport": 3306, "database": "tests", "username": "root", "userpass": "11111111", "params": [], "charset": "utf8mb4", "prefix": "" } } } ```` ### 数据表更新字段规范 ````json lines { "table": "user_user", // 表名 "title": "用户表", "key": "id", // 主键字段名称 "auto": false, // 是否id采用自动生成 "unique": [ // 多字段唯一约束 "name", "code" ], "index": [ // 索引 [ "name", "code" ], [ "time_datetime", "name" ] ], "fields": { "id": { "name": "ID", "type": "key", "length": 20, "empty": false }, "name": { "name": "名称", "type": "string", "length": 10, "empty": false, "default": "" }, "numint": { "name": "整数", "type": "int", "length": 10, "empty": false, "default": 0 }, "num_float": { "name": "整数", "type": "float", "length": 19, "dec": 2, "empty": true, "default": 0.1 }, "datetime": { "name": "日期时间", "type": "datetime", "empty": false, "default": "0000-01-01 00:00:00" } } } ````