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:
2026-03-28 15:13:04 +08:00
parent eaf282ea24
commit 51a90260e4
50 changed files with 4250 additions and 113 deletions

View File

@@ -56,9 +56,9 @@ const collections = [
{ name: 'company_id', type: 'text' },
{ name: 'users_parent_id', type: 'text' },
{ name: 'users_promo_code', type: 'text' },
{ name: 'users_id_pic_a', type: 'file', options: { maxSelect: 1, mimeTypes: ['image/jpeg', 'image/png', 'image/webp'] } },
{ name: 'users_id_pic_b', type: 'file', options: { maxSelect: 1, mimeTypes: ['image/jpeg', 'image/png', 'image/webp'] } },
{ name: 'users_title_picture', type: 'file', options: { maxSelect: 1, mimeTypes: ['image/jpeg', 'image/png', 'image/webp'] } },
{ name: 'users_id_pic_a', type: 'text' },
{ name: 'users_id_pic_b', type: 'text' },
{ name: 'users_title_picture', type: 'text' },
{ name: 'users_picture', type: 'text' },
{ name: 'usergroups_id', type: 'text' }
],
@@ -256,4 +256,4 @@ async function verifyCollections(targetCollections) {
}
}
init();
init();