feat: add content review flow

This commit is contained in:
2026-01-15 11:10:43 +08:00
parent 37da8256fa
commit 37325ab1b4
10 changed files with 422 additions and 4 deletions

View File

@@ -133,6 +133,40 @@ const docTemplate = `{
}
}
},
"/super/v1/contents/review/batch": {
"post": {
"description": "Batch review contents",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Content"
],
"summary": "Batch review contents",
"parameters": [
{
"description": "Batch review form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperContentBatchReviewForm"
}
}
],
"responses": {
"200": {
"description": "Reviewed",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/contents/{id}/review": {
"post": {
"description": "Review content",
@@ -5502,6 +5536,35 @@ const docTemplate = `{
}
}
},
"dto.SuperContentBatchReviewForm": {
"type": "object",
"required": [
"action",
"content_ids"
],
"properties": {
"action": {
"description": "Action 审核动作approve/reject。",
"type": "string",
"enum": [
"approve",
"reject"
]
},
"content_ids": {
"description": "ContentIDs 待审核内容ID列表。",
"type": "array",
"minItems": 1,
"items": {
"type": "integer"
}
},
"reason": {
"description": "Reason 审核说明(驳回时填写,便于作者修正)。",
"type": "string"
}
}
},
"dto.SuperContentReviewForm": {
"type": "object",
"required": [

View File

@@ -127,6 +127,40 @@
}
}
},
"/super/v1/contents/review/batch": {
"post": {
"description": "Batch review contents",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Content"
],
"summary": "Batch review contents",
"parameters": [
{
"description": "Batch review form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperContentBatchReviewForm"
}
}
],
"responses": {
"200": {
"description": "Reviewed",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/contents/{id}/review": {
"post": {
"description": "Review content",
@@ -5496,6 +5530,35 @@
}
}
},
"dto.SuperContentBatchReviewForm": {
"type": "object",
"required": [
"action",
"content_ids"
],
"properties": {
"action": {
"description": "Action 审核动作approve/reject。",
"type": "string",
"enum": [
"approve",
"reject"
]
},
"content_ids": {
"description": "ContentIDs 待审核内容ID列表。",
"type": "array",
"minItems": 1,
"items": {
"type": "integer"
}
},
"reason": {
"description": "Reason 审核说明(驳回时填写,便于作者修正)。",
"type": "string"
}
}
},
"dto.SuperContentReviewForm": {
"type": "object",
"required": [

View File

@@ -1003,6 +1003,27 @@ definitions:
description: Likes 累计点赞数。
type: integer
type: object
dto.SuperContentBatchReviewForm:
properties:
action:
description: Action 审核动作approve/reject
enum:
- approve
- reject
type: string
content_ids:
description: ContentIDs 待审核内容ID列表。
items:
type: integer
minItems: 1
type: array
reason:
description: Reason 审核说明(驳回时填写,便于作者修正)。
type: string
required:
- action
- content_ids
type: object
dto.SuperContentReviewForm:
properties:
action:
@@ -2138,6 +2159,28 @@ paths:
summary: Review content
tags:
- Content
/super/v1/contents/review/batch:
post:
consumes:
- application/json
description: Batch review contents
parameters:
- description: Batch review form
in: body
name: form
required: true
schema:
$ref: '#/definitions/dto.SuperContentBatchReviewForm'
produces:
- application/json
responses:
"200":
description: Reviewed
schema:
type: string
summary: Batch review contents
tags:
- Content
/super/v1/coupons:
get:
consumes: