feat: 添加微信端 API 文档和字典表初始化脚本
- 新增 openapi-wx.yaml 文件,定义微信端接口文档,包括用户统计、token 刷新、微信登录和用户资料更新等接口。 - 新增 pocketbase.dictionary.js 脚本,用于初始化和校验字典表结构,确保与预期一致。
This commit is contained in:
@@ -292,6 +292,17 @@ components:
|
||||
description:
|
||||
type: string
|
||||
example: 启用
|
||||
image:
|
||||
type: string
|
||||
description: 对应图片附件的 `attachments_id`,允许为空
|
||||
example: ATT-1743037200000-abc123
|
||||
imageUrl:
|
||||
type: string
|
||||
description: 根据 `image -> tbl_attachments` 自动解析出的图片文件流链接
|
||||
imageAttachment:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/AttachmentRecord'
|
||||
nullable: true
|
||||
sortOrder:
|
||||
type: integer
|
||||
example: 1
|
||||
@@ -355,6 +366,7 @@ components:
|
||||
items:
|
||||
type: array
|
||||
minItems: 1
|
||||
description: 每项会分别序列化写入 `dict_word_enum`、`dict_word_description`、`dict_word_image`、`dict_word_sort_order`
|
||||
items:
|
||||
$ref: '#/components/schemas/DictionaryItem'
|
||||
DictionaryDeleteRequest:
|
||||
@@ -457,6 +469,7 @@ components:
|
||||
type: string
|
||||
document_type:
|
||||
type: string
|
||||
description: 多选时按 `system_dict_id@dict_word_enum|...` 保存
|
||||
document_title:
|
||||
type: string
|
||||
document_subtitle:
|
||||
@@ -520,7 +533,7 @@ components:
|
||||
type: string
|
||||
document_keywords:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 固定字典多选字段,使用 `|` 分隔
|
||||
document_share_count:
|
||||
type: number
|
||||
document_download_count:
|
||||
@@ -529,6 +542,7 @@ components:
|
||||
type: number
|
||||
document_status:
|
||||
type: string
|
||||
description: 文档状态,仅允许 `有效` 或 `过期`,由系统根据生效日期和到期日期自动计算;当两者都为空时默认 `有效`
|
||||
document_embedding_status:
|
||||
type: string
|
||||
document_embedding_error:
|
||||
@@ -539,13 +553,13 @@ components:
|
||||
type: string
|
||||
document_product_categories:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 固定字典多选字段,使用 `|` 分隔
|
||||
document_application_scenarios:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 固定字典多选字段,使用 `|` 分隔
|
||||
document_hotel_type:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 固定字典多选字段,使用 `|` 分隔
|
||||
document_remark:
|
||||
type: string
|
||||
created:
|
||||
@@ -564,6 +578,7 @@ components:
|
||||
example: active
|
||||
document_type:
|
||||
type: string
|
||||
description: 支持按存储值过滤;多选时格式为 `system_dict_id@dict_word_enum|...`
|
||||
example: 说明书
|
||||
DocumentDetailRequest:
|
||||
type: object
|
||||
@@ -590,6 +605,7 @@ components:
|
||||
example: 2027-03-27
|
||||
document_type:
|
||||
type: string
|
||||
description: 必填;前端显示为字典项描述,存库时按 `system_dict_id@dict_word_enum|...` 保存
|
||||
document_title:
|
||||
type: string
|
||||
document_subtitle:
|
||||
@@ -618,7 +634,7 @@ components:
|
||||
type: string
|
||||
document_keywords:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 从 `文档-关键词` 字典多选后使用 `|` 分隔保存
|
||||
document_share_count:
|
||||
type: number
|
||||
document_download_count:
|
||||
@@ -627,6 +643,7 @@ components:
|
||||
type: number
|
||||
document_status:
|
||||
type: string
|
||||
description: 文档状态,仅允许 `有效` 或 `过期`,由系统根据生效日期和到期日期自动计算;当两者都为空时默认 `有效`
|
||||
document_embedding_status:
|
||||
type: string
|
||||
document_embedding_error:
|
||||
@@ -637,13 +654,13 @@ components:
|
||||
type: string
|
||||
document_product_categories:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 从 `文档-产品关联文档` 字典多选后使用 `|` 分隔保存
|
||||
document_application_scenarios:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 从 `文档-筛选依据` 字典多选后使用 `|` 分隔保存
|
||||
document_hotel_type:
|
||||
type: string
|
||||
description: 多值字段,使用 `|` 分隔
|
||||
description: 从 `文档-适用场景` 字典多选后使用 `|` 分隔保存
|
||||
document_remark:
|
||||
type: string
|
||||
DocumentDeleteRequest:
|
||||
@@ -1005,7 +1022,7 @@ paths:
|
||||
description: |
|
||||
仅允许 `ManagePlatform` 用户访问。
|
||||
`system_dict_id` 由服务端自动生成;`dict_name` 必须唯一;
|
||||
`items` 会分别序列化写入 `dict_word_enum`、`dict_word_description`、`dict_word_sort_order` 三个字段。
|
||||
`items` 会分别序列化写入 `dict_word_enum`、`dict_word_description`、`dict_word_image`、`dict_word_sort_order` 四个字段。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
||||
Reference in New Issue
Block a user