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

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