feat: add superadmin user library detail
This commit is contained in:
@@ -2179,6 +2179,66 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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",
|
||||
@@ -5376,6 +5436,19 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"consts.ContentAccessStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"revoked",
|
||||
"expired"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ContentAccessStatusActive",
|
||||
"ContentAccessStatusRevoked",
|
||||
"ContentAccessStatusExpired"
|
||||
]
|
||||
},
|
||||
"consts.ContentStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -7914,6 +7987,82 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user