feat: tenant content publish
This commit is contained in:
@@ -524,6 +524,84 @@ definitions:
|
||||
description: PriceAmount is the base price in cents (CNY 分).
|
||||
type: integer
|
||||
type: object
|
||||
dto.ContentPublishForm:
|
||||
properties:
|
||||
audio_asset_ids:
|
||||
description: AudioAssetIDs 音频资源 ID 列表:可为空;每个资源必须为 audio/main/ready。
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
cover_asset_ids:
|
||||
description: CoverAssetIDs 展示图(封面图)资源 ID 列表:1-3 张;每个资源必须为 image/main/ready。
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
currency:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.Currency'
|
||||
description: Currency 币种:当前固定为 CNY;可不传(后端默认 CNY)。
|
||||
detail:
|
||||
description: Detail 详细:用于详情页的长文本;可选;当非空时视为“文字内容”类型存在。
|
||||
type: string
|
||||
image_asset_ids:
|
||||
description: ImageAssetIDs 多图内容资源 ID 列表:可为空;每个资源必须为 image/main/ready;数量 >=
|
||||
2 时视为“多图内容”类型存在。
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
preview_seconds:
|
||||
description: PreviewSeconds 试看秒数:仅对 preview 资源生效;默认 60;必须为正整数。
|
||||
type: integer
|
||||
price_amount:
|
||||
description: PriceAmount 价格:单位为分;0 表示免费;必填(前端可默认填 0)。
|
||||
type: integer
|
||||
summary:
|
||||
description: Summary 简介:用于列表/卡片展示的短文本;可选,建议 <= 256 字符。
|
||||
type: string
|
||||
tags:
|
||||
description: Tags 标签:用于分类/检索;字符串数组;会做 trim/去重;可为空。
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
title:
|
||||
description: Title 标题:用于列表展示与搜索;必填。
|
||||
type: string
|
||||
video_asset_ids:
|
||||
description: VideoAssetIDs 视频资源 ID 列表:可为空;每个资源必须为 video/main/ready。
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
visibility:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.ContentVisibility'
|
||||
description: Visibility 可见性:控制“详情页”可见范围;默认 tenant_only。
|
||||
type: object
|
||||
dto.ContentPublishResponse:
|
||||
properties:
|
||||
content:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.Content'
|
||||
description: Content 内容主体(包含标题/简介/详细/状态等)。
|
||||
content_types:
|
||||
description: ContentTypes 内容类型列表:text/audio/video/image/multi_image(用于前端展示)。
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
cover_assets:
|
||||
description: CoverAssets 封面图绑定结果(role=cover)。
|
||||
items:
|
||||
$ref: '#/definitions/models.ContentAsset'
|
||||
type: array
|
||||
main_assets:
|
||||
description: MainAssets 主资源绑定结果(role=main;可能包含音频/视频/图片)。
|
||||
items:
|
||||
$ref: '#/definitions/models.ContentAsset'
|
||||
type: array
|
||||
price:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.ContentPrice'
|
||||
description: Price 定价信息(单位分)。
|
||||
type: object
|
||||
dto.ContentUpdateForm:
|
||||
properties:
|
||||
description:
|
||||
@@ -1139,6 +1217,14 @@ definitions:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.ContentStatus'
|
||||
description: 状态:draft/reviewing/published/unpublished/blocked;published 才对外展示
|
||||
summary:
|
||||
description: 简介:用于列表/卡片展示的短文本;建议 <= 256 字符(由业务校验)
|
||||
type: string
|
||||
tags:
|
||||
description: 标签:JSON 数组(字符串列表);用于分类/检索与聚合展示
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
tenant_id:
|
||||
description: 租户ID:多租户隔离关键字段;所有查询/写入必须限定 tenant_id
|
||||
type: integer
|
||||
@@ -2876,6 +2962,32 @@ paths:
|
||||
summary: 设置内容价格与折扣
|
||||
tags:
|
||||
- Tenant
|
||||
/t/{tenantCode}/v1/admin/contents/publish:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: Tenant Code
|
||||
in: path
|
||||
name: tenantCode
|
||||
required: true
|
||||
type: string
|
||||
- description: Form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ContentPublishForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ContentPublishResponse'
|
||||
summary: 内容发布(创建+绑定资源+定价)
|
||||
tags:
|
||||
- Tenant
|
||||
/t/{tenantCode}/v1/admin/invites:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user