feat: 规范化PocketBase数据库文档与原生API访问
- 将数据库文档拆分为按collection命名的标准文件,统一格式 - 补充tbl_company、tbl_system_dict等表的原生访问规则 - 新增users_tag、document_create等字段 - 优化用户资料更新接口,支持非必填字段 - 添加公司原生API测试脚本 - 归档本次变更至OpenSpec
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
### 1. tbl_system_dict (系统词典)
|
||||
**类型:** Base Collection
|
||||
**读写权限:** 所有人可读;仅 `ManagePlatform`/管理员可写
|
||||
|
||||
| 字段名 | 类型 | 备注 |
|
||||
| :--- | :--- | :--- |
|
||||
@@ -30,23 +31,30 @@
|
||||
|
||||
| 字段名 | 类型 | 备注 |
|
||||
| :--- | :--- | :--- |
|
||||
| company_id | text | 自定义公司id |
|
||||
| company_id | text | 公司业务id,由数据库自动生成,默认形如 `WX-COMPANY-时间串` |
|
||||
| company_name | text | 公司名称 |
|
||||
| company_type | text | 公司类型 |
|
||||
| company_entity | text | 公司法人 |
|
||||
| company_usci | text | 统一社会信用代码 |
|
||||
| company_nationality | text | 国家 |
|
||||
| company_nationality_code | text | 国家编码 |
|
||||
| company_province | text | 省份 |
|
||||
| company_province_code | text | 省份编码 |
|
||||
| company_city | text | 城市 |
|
||||
| company_city_code | text | 城市编码 |
|
||||
| company_district | text | 区/县 |
|
||||
| company_district_code | text | 区/县编码 |
|
||||
| company_postalcode | text | 邮编 |
|
||||
| company_add | text | 地址 |
|
||||
| company_status | text | 公司状态 |
|
||||
| company_level | text | 公司等级 |
|
||||
| company_owner_openid | text | 公司所有者 openid |
|
||||
| company_remark | text | 备注 |
|
||||
|
||||
**索引规划 (Indexes):**
|
||||
* `CREATE UNIQUE INDEX` 针对 `company_id` (确保业务主键唯一)
|
||||
* `CREATE INDEX` 针对 `company_usci` (加速信用代码检索)
|
||||
* `CREATE INDEX` 针对 `company_owner_openid` (加速按公司所有者 openid 查询)
|
||||
|
||||
---
|
||||
|
||||
@@ -78,6 +86,7 @@
|
||||
| users_wx_openid | text | 微信号 |
|
||||
| users_level | text | 用户等级 |
|
||||
| users_type | text | 用户类型 |
|
||||
| users_tag | text | 用户标签 |
|
||||
| users_status | text | 用户状态 |
|
||||
| company_id | text | 公司id (存储 tbl_company.company_id) |
|
||||
| users_parent_id | text | 用户父级id (存储 tbl_users.users_id) |
|
||||
|
||||
Reference in New Issue
Block a user