feat: add superadmin user interaction views
This commit is contained in:
@@ -2059,6 +2059,186 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/favorites": {
|
||||
"get": {
|
||||
"description": "List user's favorited contents",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "List user favorites",
|
||||
"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.SuperUserContentActionItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/following": {
|
||||
"get": {
|
||||
"description": "List tenants followed by user",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "List user following tenants",
|
||||
"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.UserTenantItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/likes": {
|
||||
"get": {
|
||||
"description": "List user's liked contents",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "List user likes",
|
||||
"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.SuperUserContentActionItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/notifications": {
|
||||
"get": {
|
||||
"description": "List notifications of a user",
|
||||
@@ -5371,6 +5551,17 @@ const docTemplate = `{
|
||||
"TenantUserRoleTenantAdmin"
|
||||
]
|
||||
},
|
||||
"consts.UserContentActionType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"like",
|
||||
"favorite"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"UserContentActionTypeLike",
|
||||
"UserContentActionTypeFavorite"
|
||||
]
|
||||
},
|
||||
"consts.UserCouponStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -7605,6 +7796,35 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperUserContentActionItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action_at": {
|
||||
"description": "ActionAt 互动发生时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"action_id": {
|
||||
"description": "ActionID 互动记录ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"action_type": {
|
||||
"description": "ActionType 互动类型(like/favorite)。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/consts.UserContentActionType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"description": "Content 互动对应内容详情(含租户与作者信息)。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.AdminContentItem"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperUserCouponItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -2053,6 +2053,186 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/favorites": {
|
||||
"get": {
|
||||
"description": "List user's favorited contents",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "List user favorites",
|
||||
"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.SuperUserContentActionItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/following": {
|
||||
"get": {
|
||||
"description": "List tenants followed by user",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "List user following tenants",
|
||||
"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.UserTenantItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/likes": {
|
||||
"get": {
|
||||
"description": "List user's liked contents",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "List user likes",
|
||||
"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.SuperUserContentActionItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/super/v1/users/{id}/notifications": {
|
||||
"get": {
|
||||
"description": "List notifications of a user",
|
||||
@@ -5365,6 +5545,17 @@
|
||||
"TenantUserRoleTenantAdmin"
|
||||
]
|
||||
},
|
||||
"consts.UserContentActionType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"like",
|
||||
"favorite"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"UserContentActionTypeLike",
|
||||
"UserContentActionTypeFavorite"
|
||||
]
|
||||
},
|
||||
"consts.UserCouponStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -7599,6 +7790,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperUserContentActionItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action_at": {
|
||||
"description": "ActionAt 互动发生时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"action_id": {
|
||||
"description": "ActionID 互动记录ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"action_type": {
|
||||
"description": "ActionType 互动类型(like/favorite)。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/consts.UserContentActionType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"description": "Content 互动对应内容详情(含租户与作者信息)。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.AdminContentItem"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SuperUserCouponItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -136,6 +136,14 @@ definitions:
|
||||
x-enum-varnames:
|
||||
- TenantUserRoleMember
|
||||
- TenantUserRoleTenantAdmin
|
||||
consts.UserContentActionType:
|
||||
enum:
|
||||
- like
|
||||
- favorite
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- UserContentActionTypeLike
|
||||
- UserContentActionTypeFavorite
|
||||
consts.UserCouponStatus:
|
||||
enum:
|
||||
- unused
|
||||
@@ -1691,6 +1699,23 @@ definitions:
|
||||
- $ref: '#/definitions/dto.SuperUserLite'
|
||||
description: User 用户信息。
|
||||
type: object
|
||||
dto.SuperUserContentActionItem:
|
||||
properties:
|
||||
action_at:
|
||||
description: ActionAt 互动发生时间(RFC3339)。
|
||||
type: string
|
||||
action_id:
|
||||
description: ActionID 互动记录ID。
|
||||
type: integer
|
||||
action_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.UserContentActionType'
|
||||
description: ActionType 互动类型(like/favorite)。
|
||||
content:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.AdminContentItem'
|
||||
description: Content 互动对应内容详情(含租户与作者信息)。
|
||||
type: object
|
||||
dto.SuperUserCouponItem:
|
||||
properties:
|
||||
coupon_id:
|
||||
@@ -3916,6 +3941,117 @@ paths:
|
||||
summary: List user coupons
|
||||
tags:
|
||||
- User
|
||||
/super/v1/users/{id}/favorites:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: List user's favorited contents
|
||||
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.SuperUserContentActionItem'
|
||||
type: array
|
||||
type: object
|
||||
summary: List user favorites
|
||||
tags:
|
||||
- User
|
||||
/super/v1/users/{id}/following:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: List tenants followed by 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.UserTenantItem'
|
||||
type: array
|
||||
type: object
|
||||
summary: List user following tenants
|
||||
tags:
|
||||
- User
|
||||
/super/v1/users/{id}/likes:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: List user's liked contents
|
||||
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.SuperUserContentActionItem'
|
||||
type: array
|
||||
type: object
|
||||
summary: List user likes
|
||||
tags:
|
||||
- User
|
||||
/super/v1/users/{id}/notifications:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user