feat: 添加用户优惠券列表接口及相关数据结构
This commit is contained in:
124
api-spec.yaml
124
api-spec.yaml
@@ -286,6 +286,32 @@ components:
|
||||
realname:
|
||||
type: string
|
||||
|
||||
UserCouponItem:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
coupon_id:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
enum: [fix_amount, discount]
|
||||
value:
|
||||
type: integer
|
||||
min_order_amount:
|
||||
type: integer
|
||||
start_at:
|
||||
type: string
|
||||
end_at:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
enum: [unused, used, expired]
|
||||
|
||||
# --- Upload ---
|
||||
UploadResult:
|
||||
type: object
|
||||
@@ -787,6 +813,84 @@ paths:
|
||||
time:
|
||||
type: string
|
||||
|
||||
/me/coupons:
|
||||
get:
|
||||
summary: List user coupons
|
||||
parameters:
|
||||
- name: status
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: [unused, used, expired]
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/UserCouponItem'
|
||||
|
||||
# ============================
|
||||
# Storage (Presigned)
|
||||
# ============================
|
||||
/storage/{key}:
|
||||
put:
|
||||
summary: Upload file (Presigned)
|
||||
tags: [Storage]
|
||||
parameters:
|
||||
- name: key
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: expires
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: sign
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
responses:
|
||||
'200':
|
||||
description: Upload successful
|
||||
get:
|
||||
summary: Download file (Presigned)
|
||||
tags: [Storage]
|
||||
parameters:
|
||||
- name: key
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: expires
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: sign
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Download file
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
|
||||
# ============================
|
||||
# Transaction
|
||||
# ============================
|
||||
@@ -806,6 +910,8 @@ paths:
|
||||
quantity:
|
||||
type: integer
|
||||
default: 1
|
||||
user_coupon_id:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
@@ -864,6 +970,24 @@ paths:
|
||||
type: string
|
||||
enum: [unpaid, paid, completed]
|
||||
|
||||
/webhook/payment/notify:
|
||||
post:
|
||||
summary: Payment Webhook
|
||||
tags: [Transaction]
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
order_id:
|
||||
type: string
|
||||
external_id:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
|
||||
# ============================
|
||||
# Creator Center
|
||||
# ============================
|
||||
|
||||
Reference in New Issue
Block a user