93 lines
2.3 KiB
JavaScript
93 lines
2.3 KiB
JavaScript
/**
|
|
* @swagger
|
|
* components:
|
|
* schemas:
|
|
* CartItem:
|
|
* type: object
|
|
* required:
|
|
* - user_id
|
|
* - product_id
|
|
* - quantity
|
|
* properties:
|
|
* id:
|
|
* type: integer
|
|
* description: 购物车商品ID
|
|
* user_id:
|
|
* type: integer
|
|
* description: 用户ID
|
|
* product_id:
|
|
* type: integer
|
|
* description: 商品ID
|
|
* quantity:
|
|
* type: integer
|
|
* description: 商品数量
|
|
* created_at:
|
|
* type: string
|
|
* format: date-time
|
|
* description: 创建时间
|
|
* updated_at:
|
|
* type: string
|
|
* format: date-time
|
|
* description: 更新时间
|
|
*
|
|
* CartItemWithProduct:
|
|
* type: object
|
|
* properties:
|
|
* id:
|
|
* type: integer
|
|
* description: 购物车商品ID
|
|
* product_id:
|
|
* type: integer
|
|
* description: 商品ID
|
|
* product_name:
|
|
* type: string
|
|
* description: 商品名称
|
|
* quantity:
|
|
* type: integer
|
|
* description: 商品数量
|
|
* points_price:
|
|
* type: integer
|
|
* description: 积分价格
|
|
* rongdou_price:
|
|
* type: number
|
|
* description: 融豆价格
|
|
* image_url:
|
|
* type: string
|
|
* description: 商品图片URL
|
|
* stock:
|
|
* type: integer
|
|
* description: 库存数量
|
|
* payment_methods:
|
|
* type: array
|
|
* items:
|
|
* type: string
|
|
* description: 支付方式列表
|
|
* created_at:
|
|
* type: string
|
|
* format: date-time
|
|
* description: 创建时间
|
|
*
|
|
* AddToCartRequest:
|
|
* type: object
|
|
* required:
|
|
* - product_id
|
|
* - quantity
|
|
* properties:
|
|
* product_id:
|
|
* type: integer
|
|
* description: 商品ID
|
|
* quantity:
|
|
* type: integer
|
|
* minimum: 1
|
|
* description: 商品数量
|
|
*
|
|
* UpdateCartRequest:
|
|
* type: object
|
|
* required:
|
|
* - quantity
|
|
* properties:
|
|
* quantity:
|
|
* type: integer
|
|
* minimum: 1
|
|
* description: 商品数量
|
|
*/ |