2026-04-09 14:49:12 +08:00
|
|
|
|
openapi: 3.1.0
|
|
|
|
|
|
info:
|
|
|
|
|
|
title: BAI PocketBase Native API - Cart
|
|
|
|
|
|
version: 1.0.0
|
|
|
|
|
|
description: |
|
|
|
|
|
|
PocketBase 原生 `tbl_cart` records API 文档。
|
|
|
|
|
|
本文件可单独导入使用,不依赖其他 YAML。
|
|
|
|
|
|
servers:
|
|
|
|
|
|
- url: https://bai-api.blv-oa.com
|
|
|
|
|
|
description: 生产环境
|
|
|
|
|
|
- url: http://localhost:8090
|
|
|
|
|
|
description: PocketBase 本地环境
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- name: 购物车
|
|
|
|
|
|
description: PocketBase 原生购物车记录接口
|
2026-04-08 09:04:36 +08:00
|
|
|
|
paths:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
/pb/api/collections/tbl_cart/records:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
get:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
operationId: getPocketBaseCartRecords
|
2026-04-08 20:14:22 +08:00
|
|
|
|
tags: [购物车]
|
|
|
|
|
|
summary: 查询购物车记录列表
|
|
|
|
|
|
description: |
|
|
|
|
|
|
使用 PocketBase 原生 records list 接口查询 `tbl_cart`。
|
2026-04-09 14:49:12 +08:00
|
|
|
|
|
|
|
|
|
|
说明:
|
|
|
|
|
|
- `cart_product_id` 是 relation 字段,默认仅返回关联记录 id。
|
|
|
|
|
|
- 如需同时返回 `tbl_product_list` 详情,请传 `expand=cart_product_id`。
|
2026-04-08 20:14:22 +08:00
|
|
|
|
parameters:
|
|
|
|
|
|
- name: filter
|
|
|
|
|
|
in: query
|
|
|
|
|
|
required: false
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: PocketBase 原生过滤表达式
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 过滤表达式|string
|
2026-04-08 20:14:22 +08:00
|
|
|
|
- name: page
|
|
|
|
|
|
in: query
|
|
|
|
|
|
required: false
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
minimum: 1
|
|
|
|
|
|
default: 1
|
|
|
|
|
|
- name: perPage
|
|
|
|
|
|
in: query
|
|
|
|
|
|
required: false
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
minimum: 1
|
|
|
|
|
|
default: 20
|
|
|
|
|
|
- name: sort
|
|
|
|
|
|
in: query
|
|
|
|
|
|
required: false
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 排序表达式|string
|
|
|
|
|
|
- name: expand
|
|
|
|
|
|
in: query
|
|
|
|
|
|
required: false
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 关系字段展开;传 `cart_product_id` 时返回 `expand.cart_product_id`
|
|
|
|
|
|
example: 关联展开字段|string
|
2026-04-08 20:14:22 +08:00
|
|
|
|
responses:
|
|
|
|
|
|
'200':
|
|
|
|
|
|
description: 查询成功
|
|
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseCartListResponse'
|
|
|
|
|
|
'400':
|
|
|
|
|
|
description: 查询参数错误
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'401':
|
|
|
|
|
|
description: token 无效或已过期
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'403':
|
|
|
|
|
|
description: 无权访问
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'500':
|
|
|
|
|
|
description: 服务端错误
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 09:04:36 +08:00
|
|
|
|
post:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
operationId: postPocketBaseCartRecord
|
2026-04-08 20:14:22 +08:00
|
|
|
|
tags: [购物车]
|
|
|
|
|
|
summary: 创建购物车记录
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: |
|
2026-04-08 20:14:22 +08:00
|
|
|
|
使用 PocketBase 原生 records create 接口向 `tbl_cart` 新增记录。
|
2026-04-08 09:04:36 +08:00
|
|
|
|
requestBody:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
required: true
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseCartCreateRequest'
|
2026-04-08 09:04:36 +08:00
|
|
|
|
example:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
cart_id: 购物车业务ID|string
|
|
|
|
|
|
cart_number: 购物车名称或分组号|string
|
|
|
|
|
|
cart_owner: 购物车所有者openid|string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
cart_product_id: 产品业务ID|string
|
2026-04-08 20:14:22 +08:00
|
|
|
|
cart_product_quantity: 产品数量|integer
|
|
|
|
|
|
cart_status: 购物车状态|string
|
|
|
|
|
|
cart_at_price: 加入购物车时价格|number
|
|
|
|
|
|
cart_remark: 备注|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
responses:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'200':
|
|
|
|
|
|
description: 创建成功
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseCartRecord'
|
|
|
|
|
|
'400':
|
|
|
|
|
|
description: 参数错误或违反集合规则
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'401':
|
|
|
|
|
|
description: token 无效或已过期
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'403':
|
|
|
|
|
|
description: 无权访问
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'500':
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: 服务端错误
|
2026-04-09 14:49:12 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
|
|
|
|
|
/pb/api/collections/tbl_cart/records/{recordId}:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
patch:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
operationId: patchPocketBaseCartRecordByRecordId
|
2026-04-08 20:14:22 +08:00
|
|
|
|
tags: [购物车]
|
|
|
|
|
|
summary: 更新购物车记录
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- name: recordId
|
|
|
|
|
|
in: path
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
example: PocketBase记录主键|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
requestBody:
|
|
|
|
|
|
required: true
|
|
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseCartUpdateRequest'
|
2026-04-08 09:04:36 +08:00
|
|
|
|
example:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
cart_number: 购物车名称或分组号|string
|
|
|
|
|
|
cart_owner: 购物车所有者openid|string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
cart_product_id: 产品业务ID|string
|
2026-04-08 20:14:22 +08:00
|
|
|
|
cart_product_quantity: 产品数量|integer
|
|
|
|
|
|
cart_status: 购物车状态|string
|
|
|
|
|
|
cart_at_price: 加入购物车时价格|number
|
|
|
|
|
|
cart_remark: 备注|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
responses:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
'200':
|
|
|
|
|
|
description: 更新成功
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-08 20:14:22 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseCartRecord'
|
|
|
|
|
|
'400':
|
|
|
|
|
|
description: 参数错误
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
|
|
|
|
|
'401':
|
|
|
|
|
|
description: token 无效或已过期
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
|
|
|
|
|
'404':
|
|
|
|
|
|
description: 记录不存在
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
|
|
|
|
|
'500':
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: 服务端错误
|
|
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 09:04:36 +08:00
|
|
|
|
delete:
|
|
|
|
|
|
operationId: deletePocketBaseCartRecordByRecordId
|
2026-04-09 14:49:12 +08:00
|
|
|
|
tags: [购物车]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
summary: 删除购物车记录
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- name: recordId
|
|
|
|
|
|
in: path
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: PocketBase记录主键|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
responses:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
'204':
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: 删除成功
|
2026-04-09 14:49:12 +08:00
|
|
|
|
'401':
|
|
|
|
|
|
description: token 无效或已过期
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
|
|
|
|
|
'404':
|
|
|
|
|
|
description: 记录不存在
|
2026-04-08 09:04:36 +08:00
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
|
|
|
|
|
'500':
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: 服务端错误
|
|
|
|
|
|
content:
|
|
|
|
|
|
application/json:
|
|
|
|
|
|
schema:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseNativeError'
|
2026-04-08 09:04:36 +08:00
|
|
|
|
components:
|
|
|
|
|
|
schemas:
|
|
|
|
|
|
PocketBaseNativeError:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
properties:
|
|
|
|
|
|
code:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, string]
|
2026-04-08 20:14:22 +08:00
|
|
|
|
description: PocketBase错误码
|
2026-04-08 09:04:36 +08:00
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
2026-04-08 20:14:22 +08:00
|
|
|
|
description: PocketBase错误信息
|
2026-04-08 09:04:36 +08:00
|
|
|
|
data:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
additionalProperties: true
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: PocketBase错误数据
|
2026-04-08 09:04:36 +08:00
|
|
|
|
example:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
code: 错误状态码|integer
|
|
|
|
|
|
message: PocketBase原生错误信息|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
data:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
字段名|string: 字段值|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
PocketBaseRecordBase:
|
|
|
|
|
|
type: object
|
2026-04-09 14:49:12 +08:00
|
|
|
|
required: [id, collectionId, collectionName, created, updated]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
properties:
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: PocketBase记录主键
|
2026-04-08 09:04:36 +08:00
|
|
|
|
collectionId:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: 集合ID
|
2026-04-08 09:04:36 +08:00
|
|
|
|
collectionName:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: 集合名称
|
2026-04-08 09:04:36 +08:00
|
|
|
|
created:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 记录创建时间
|
|
|
|
|
|
updated:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 记录更新时间
|
|
|
|
|
|
example:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
id: PocketBase记录主键|string
|
|
|
|
|
|
collectionId: 集合ID|string
|
|
|
|
|
|
collectionName: 集合名称|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
created: 记录创建时间|string
|
|
|
|
|
|
updated: 记录更新时间|string
|
|
|
|
|
|
PocketBaseCartFields:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
properties:
|
|
|
|
|
|
cart_id:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: 购物车业务ID
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_number:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 购物车名称或分组号
|
|
|
|
|
|
cart_create:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: 购物车项创建时间
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_owner:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: 购物车所有者openid
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_id:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
description: 产品业务ID
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_quantity:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, number]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: 产品数量
|
|
|
|
|
|
cart_status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 购物车状态
|
|
|
|
|
|
cart_at_price:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [number, integer]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
description: 加入购物车时价格
|
|
|
|
|
|
cart_remark:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 备注
|
|
|
|
|
|
example:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
cart_id: 购物车业务ID|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_number: 购物车名称或分组号|string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
cart_create: 购物车项创建时间|string
|
|
|
|
|
|
cart_owner: 购物车所有者openid|string
|
|
|
|
|
|
cart_product_id: 产品业务ID|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_quantity: 产品数量|integer
|
|
|
|
|
|
cart_status: 购物车状态|string
|
|
|
|
|
|
cart_at_price: 加入购物车时价格|number
|
|
|
|
|
|
cart_remark: 备注|string
|
|
|
|
|
|
PocketBaseCartRecord:
|
|
|
|
|
|
allOf:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
- $ref: '#/components/schemas/PocketBaseRecordBase'
|
|
|
|
|
|
- $ref: '#/components/schemas/PocketBaseCartFields'
|
|
|
|
|
|
- type: object
|
|
|
|
|
|
properties:
|
|
|
|
|
|
expand:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
description: 关系字段展开结果(需请求参数 `expand=cart_product_id`)
|
|
|
|
|
|
properties:
|
|
|
|
|
|
cart_product_id:
|
|
|
|
|
|
$ref: '#/components/schemas/PocketBaseProductListExpand'
|
2026-04-08 09:04:36 +08:00
|
|
|
|
PocketBaseCartCreateRequest:
|
|
|
|
|
|
type: object
|
2026-04-09 14:49:12 +08:00
|
|
|
|
required: [cart_owner]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
properties:
|
|
|
|
|
|
cart_id:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车业务ID|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_number:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车名称或分组号|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_owner:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车所有者openid|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_id:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 产品业务ID|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_quantity:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, number]
|
|
|
|
|
|
example: 产品数量|integer
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_status:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车状态|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_at_price:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [number, integer]
|
|
|
|
|
|
example: 加入购物车时价格|number
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_remark:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 备注|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
PocketBaseCartUpdateRequest:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
properties:
|
|
|
|
|
|
cart_number:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车名称或分组号|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_owner:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车所有者openid|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_id:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 产品业务ID|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_product_quantity:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, number]
|
|
|
|
|
|
example: 产品数量|integer
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_status:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 购物车状态|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_at_price:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [number, integer]
|
|
|
|
|
|
example: 加入购物车时价格|number
|
2026-04-08 09:04:36 +08:00
|
|
|
|
cart_remark:
|
|
|
|
|
|
type: string
|
2026-04-09 14:49:12 +08:00
|
|
|
|
example: 备注|string
|
2026-04-08 09:04:36 +08:00
|
|
|
|
PocketBaseCartListResponse:
|
|
|
|
|
|
type: object
|
2026-04-09 14:49:12 +08:00
|
|
|
|
required: [page, perPage, totalItems, totalPages, items]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
properties:
|
|
|
|
|
|
page:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, string]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
perPage:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, string]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
totalItems:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, string]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
totalPages:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
type: [integer, string]
|
2026-04-08 09:04:36 +08:00
|
|
|
|
items:
|
|
|
|
|
|
type: array
|
|
|
|
|
|
items:
|
2026-04-09 14:49:12 +08:00
|
|
|
|
$ref: '#/components/schemas/PocketBaseCartRecord'
|
|
|
|
|
|
PocketBaseProductListExpand:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
description: tbl_product_list 关联展开后的记录对象(示例字段)
|
|
|
|
|
|
properties:
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: PocketBase记录主键
|
|
|
|
|
|
example: PocketBase记录主键|string
|
|
|
|
|
|
collectionId:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 集合ID
|
|
|
|
|
|
example: 集合ID|string
|
|
|
|
|
|
collectionName:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 集合名称
|
|
|
|
|
|
example: 集合名称|string
|
|
|
|
|
|
prod_list_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 产品业务ID
|
|
|
|
|
|
example: 产品业务ID|string
|
|
|
|
|
|
prod_list_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 产品名称
|
|
|
|
|
|
example: 产品名称|string
|
|
|
|
|
|
prod_list_modelnumber:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 产品型号
|
|
|
|
|
|
example: 产品型号|string
|
|
|
|
|
|
prod_list_basic_price:
|
|
|
|
|
|
type: [number, integer]
|
|
|
|
|
|
description: 基础价格
|
|
|
|
|
|
example: 基础价格|number
|
|
|
|
|
|
prod_list_status:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: 产品状态
|
|
|
|
|
|
example: 产品状态|string
|