- 在 package.json 中添加迁移脚本 `migrate:cart-active-unique-index`。 - 修改 `pocketbase.cart-order.js` 文件,更新 `cart_id` 和 `cart_product_id` 字段的必填属性,并添加唯一索引 `idx_tbl_cart_owner_product_active_unique`。 - 在 `pocketbase.ensure-cart-order-autogen-id.js` 中,调整 `cart_id` 字段的必填属性为可选,并确保 `order_id` 字段为必填。 - 在 `pocketbase.product-list.js` 中,新增 `prod_list_barcode` 字段。 - 新增 `make-openapi-standalone.cjs` 脚本,用于处理 OpenAPI 文档。 - 新增 `pocketbase.cart-active-unique-index.js` 脚本,处理购物车的唯一索引和去重逻辑。
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: BAI PocketBase Native API
|
|
version: 1.0.0-wx-folder
|
|
description: |
|
|
本目录仅收敛 PocketBase 原生 API 文档,不包含自定义 hooks API。
|
|
|
|
本文件为目录索引,支持单文件独立导入,不依赖其他 YAML。
|
|
|
|
文档约定:
|
|
- 不单独配置鉴权组件;如接口需要登录,请直接在说明中关注 `Authorization: Bearer <token>`
|
|
- 示例字段值统一使用 `<字段说明>|<类型>` 风格
|
|
- 原生接口返回 PocketBase 标准 records 结构,不使用 hooks 统一响应信封
|
|
servers:
|
|
- url: https://bai-api.blv-oa.com
|
|
description: 生产环境
|
|
- url: http://127.0.0.1:8090
|
|
description: PocketBase 本地环境
|
|
tags:
|
|
- name: 企业信息
|
|
description: PocketBase 原生公司记录接口
|
|
- name: 附件信息
|
|
description: PocketBase 原生附件记录接口
|
|
- name: 产品信息
|
|
description: PocketBase 原生产品记录接口
|
|
- name: 文档信息
|
|
description: PocketBase 原生文档记录接口
|
|
- name: 购物车
|
|
description: PocketBase 原生购物车记录接口
|
|
- name: 订单
|
|
description: PocketBase 原生订单记录接口
|
|
paths: {}
|
|
x-index:
|
|
files:
|
|
- company.yaml
|
|
- attachments.yaml
|
|
- products.yaml
|
|
- documents.yaml
|
|
- cart.yaml
|
|
- order.yaml |