feat: 添加 PocketBase MiniApp 公司 API 文档和文件字段迁移脚本
- 新增 openapi-miniapp-company.yaml 文件,定义 tbl_company 的基础 CRUD 接口文档,包括查询、创建、更新和删除公司记录的详细描述和示例。 - 新增 pocketbase.file-fields-to-attachments.js 脚本,用于迁移 PocketBase 中的文件字段到文本字段,并处理 tbl_attachments 集合的公开规则。
This commit is contained in:
@@ -82,10 +82,10 @@
|
||||
| company_id | text | 公司id (存储 tbl_company.company_id) |
|
||||
| users_parent_id | text | 用户父级id (存储 tbl_users.users_id) |
|
||||
| users_promo_code | text | 用户推广码 |
|
||||
| users_id_pic_a | file | 用户证件照片(正) |
|
||||
| users_id_pic_b | file | 用户证件照片(反) |
|
||||
| users_title_picture | file | 用户资质照片 |
|
||||
| users_picture | file | 用户头像 |
|
||||
| users_id_pic_a | text | 用户证件照片(正),保存 tbl_attachments.attachments_id |
|
||||
| users_id_pic_b | text | 用户证件照片(反),保存 tbl_attachments.attachments_id |
|
||||
| users_title_picture | text | 用户资质照片,保存 tbl_attachments.attachments_id |
|
||||
| users_picture | text | 用户头像,保存 tbl_attachments.attachments_id |
|
||||
| usergroups_id | text | 用户组id (存储 tbl_user_groups.usergroups_id) |
|
||||
|
||||
**索引规划 (Indexes):**
|
||||
@@ -93,5 +93,3 @@
|
||||
* `CREATE UNIQUE INDEX` 针对 `users_phone` (确保手机号唯一,加速登录查询)
|
||||
* `CREATE UNIQUE INDEX` 针对 `users_wx_openid` (确保微信开放ID唯一)
|
||||
* `CREATE INDEX` 针对 `company_id`, `usergroups_id`, `users_parent_id` (加速这三个高频业务外键的匹配查询)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user