feat: add superadmin user library detail

This commit is contained in:
2026-01-15 16:17:32 +08:00
parent 339fd4fb1d
commit c8ec0af07f
10 changed files with 1104 additions and 10 deletions

View File

@@ -1,5 +1,15 @@
basePath: /
definitions:
consts.ContentAccessStatus:
enum:
- active
- revoked
- expired
type: string
x-enum-varnames:
- ContentAccessStatusActive
- ContentAccessStatusRevoked
- ContentAccessStatusExpired
consts.ContentStatus:
enum:
- draft
@@ -1778,6 +1788,54 @@ definitions:
description: Value 券面值/折扣值。
type: integer
type: object
dto.SuperUserLibraryItem:
properties:
access_id:
description: AccessID 访问记录ID。
type: integer
access_status:
allOf:
- $ref: '#/definitions/consts.ContentAccessStatus'
description: AccessStatus 访问状态。
access_status_description:
description: AccessStatusDescription 访问状态描述(用于展示)。
type: string
accessed_at:
description: AccessedAt 获取访问权限时间RFC3339
type: string
amount_paid:
description: AmountPaid 该内容实付金额(分)。
type: integer
content:
allOf:
- $ref: '#/definitions/dto.AdminContentItem'
description: Content 内容详情(含租户/作者/价格)。
content_id:
description: ContentID 内容ID。
type: integer
order_id:
description: OrderID 订单ID。
type: integer
order_status:
allOf:
- $ref: '#/definitions/consts.OrderStatus'
description: OrderStatus 订单状态。
order_status_description:
description: OrderStatusDescription 订单状态描述(用于展示)。
type: string
order_type:
allOf:
- $ref: '#/definitions/consts.OrderType'
description: OrderType 订单类型。
paid_at:
description: PaidAt 支付时间RFC3339
type: string
snapshot:
description: Snapshot 下单快照(内容标题/金额等)。
tenant_id:
description: TenantID 内容所属租户ID。
type: integer
type: object
dto.SuperUserLite:
properties:
created_at:
@@ -4015,6 +4073,43 @@ paths:
summary: List user following tenants
tags:
- User
/super/v1/users/{id}/library:
get:
consumes:
- application/json
description: List purchased contents of a user
parameters:
- description: User ID
format: int64
in: path
name: id
required: true
type: integer
- description: Page number
in: query
name: page
type: integer
- description: Page size
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
items:
$ref: '#/definitions/dto.SuperUserLibraryItem'
type: array
type: object
summary: List user library
tags:
- User
/super/v1/users/{id}/likes:
get:
consumes: