2020-08-15 17:36:12 +08:00
|
|
|
|
# CONTRIBUTING
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 目录说明
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
collection (表目录)
|
|
|
|
|
├─opendb-*
|
|
|
|
|
│ ├─collection.json (表结构)
|
|
|
|
|
│ ├─data.json (可选初始化数据)
|
|
|
|
|
│ └─package.json (表信息)
|
|
|
|
|
├─...
|
|
|
|
|
database (表分类目录)
|
|
|
|
|
├─opendb-* (表分类)
|
|
|
|
|
│ ├─db_init.json (关联表)
|
|
|
|
|
│ └─package.json (分类信息)
|
|
|
|
|
├─...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### collection/opendb-*/collection.json
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
schema: {}, // 参考 JSON Schema 规范
|
2021-02-01 11:57:44 +08:00
|
|
|
|
index: [] // 索引,参考 https://uniapp.dcloud.net.cn/uniCloud/db-index
|
2020-08-15 17:36:12 +08:00
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### database/opendb-*/package.json
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"name": "@opendb/opendb-mall",
|
|
|
|
|
"version": "0.0.1",
|
|
|
|
|
"description": "", // 表分类描述
|
|
|
|
|
"keywords": ["","",""], // 关键字,用于表搜索
|
|
|
|
|
"opendb": {
|
|
|
|
|
"type": "database", // 类别,database 标识数据库
|
|
|
|
|
"title": "电商系统" // 标题
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
2020-08-15 17:56:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### [Pull Request 指南](https://gitee.com/help/articles/4128)
|
2021-03-02 14:35:56 +08:00
|
|
|
|
|
|
|
|
|
### > 表的字段名,不能使用JavaScript关键字
|