1687 lines
39 KiB
YAML
1687 lines
39 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
title: MLKJ Website Admin API
|
||
version: 0.1.0
|
||
description: 模灵科技官网与赛道页管理端 API 设计稿
|
||
servers:
|
||
- url: /api
|
||
description: Same origin API
|
||
- url: http://127.0.0.1:3001/api
|
||
description: Local development
|
||
security:
|
||
- bearerAuth: []
|
||
tags:
|
||
- name: Auth
|
||
description: 管理端鉴权
|
||
- name: Dashboard
|
||
description: 控制台
|
||
- name: SiteContent
|
||
description: 官网内容管理
|
||
- name: CompetitionAdmin
|
||
description: 赛道内容管理
|
||
- name: Media
|
||
description: 素材与上传
|
||
- name: CoursesAdmin
|
||
description: 课程视频管理
|
||
- name: WorksAdmin
|
||
description: 作品管理
|
||
- name: Evaluation
|
||
description: 作品评选
|
||
- name: InquiriesAdmin
|
||
description: 咨询线索
|
||
- name: PublicSite
|
||
description: 前台公开接口
|
||
|
||
paths:
|
||
/admin/auth/login:
|
||
post:
|
||
tags: [Auth]
|
||
summary: 管理员登录
|
||
security: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LoginRequest'
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/LoginResponse'
|
||
|
||
/admin/auth/refresh:
|
||
post:
|
||
tags: [Auth]
|
||
summary: 刷新访问令牌
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
required: [refreshToken]
|
||
properties:
|
||
refreshToken:
|
||
type: string
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/auth/logout:
|
||
post:
|
||
tags: [Auth]
|
||
summary: 退出登录
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/me:
|
||
get:
|
||
tags: [Auth]
|
||
summary: 当前管理员信息
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/AdminUser'
|
||
|
||
/admin/dashboard:
|
||
get:
|
||
tags: [Dashboard]
|
||
summary: 管理后台首页数据
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/Dashboard'
|
||
|
||
/admin/site/config:
|
||
get:
|
||
tags: [SiteContent]
|
||
summary: 获取站点基础配置草稿和发布内容
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
patch:
|
||
tags: [SiteContent]
|
||
summary: 更新站点基础配置草稿
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SiteConfigInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/content/pages/{pageKey}/sections:
|
||
get:
|
||
tags: [SiteContent]
|
||
summary: 获取页面内容区块
|
||
parameters:
|
||
- $ref: '#/components/parameters/PageKey'
|
||
- $ref: '#/components/parameters/Lang'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
post:
|
||
tags: [SiteContent]
|
||
summary: 新建页面内容区块
|
||
parameters:
|
||
- $ref: '#/components/parameters/PageKey'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ContentSectionInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/content/sections/{id}:
|
||
get:
|
||
tags: [SiteContent]
|
||
summary: 内容区块详情
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
patch:
|
||
tags: [SiteContent]
|
||
summary: 更新内容区块草稿
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ContentSectionInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
delete:
|
||
tags: [SiteContent]
|
||
summary: 归档内容区块
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/content/sections/{id}/publish:
|
||
post:
|
||
tags: [SiteContent]
|
||
summary: 发布内容区块
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: false
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/PublishRequest'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competitions:
|
||
get:
|
||
tags: [CompetitionAdmin]
|
||
summary: 赛道列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- $ref: '#/components/parameters/Status'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
post:
|
||
tags: [CompetitionAdmin]
|
||
summary: 新建赛道
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/CompetitionInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competitions/{id}:
|
||
get:
|
||
tags: [CompetitionAdmin]
|
||
summary: 赛道详情
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
patch:
|
||
tags: [CompetitionAdmin]
|
||
summary: 更新赛道
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/CompetitionInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
delete:
|
||
tags: [CompetitionAdmin]
|
||
summary: 删除或归档赛道
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competitions/{id}/sections:
|
||
get:
|
||
tags: [CompetitionAdmin]
|
||
summary: 获取赛道页内容区块
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
post:
|
||
tags: [CompetitionAdmin]
|
||
summary: 新建赛道页内容区块
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ContentSectionInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competitions/{id}/schedules:
|
||
get:
|
||
tags: [CompetitionAdmin]
|
||
summary: 赛程列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
post:
|
||
tags: [CompetitionAdmin]
|
||
summary: 新建赛程
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ScheduleInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competition-schedules/{id}:
|
||
patch:
|
||
tags: [CompetitionAdmin]
|
||
summary: 更新赛程
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ScheduleInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
delete:
|
||
tags: [CompetitionAdmin]
|
||
summary: 删除赛程
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competitions/{id}/resources:
|
||
get:
|
||
tags: [CompetitionAdmin]
|
||
summary: 赛道资源列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
post:
|
||
tags: [CompetitionAdmin]
|
||
summary: 新建赛道资源
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ResourceInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/competition-resources/{id}:
|
||
patch:
|
||
tags: [CompetitionAdmin]
|
||
summary: 更新赛道资源
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ResourceInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
delete:
|
||
tags: [CompetitionAdmin]
|
||
summary: 删除赛道资源
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/uploads/policy:
|
||
post:
|
||
tags: [Media]
|
||
summary: 获取 OSS 上传凭证
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/UploadPolicyRequest'
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/UploadPolicyResponse'
|
||
|
||
/admin/uploads/complete:
|
||
post:
|
||
tags: [Media]
|
||
summary: 上传完成登记
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/UploadCompleteRequest'
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/FileRecord'
|
||
|
||
/admin/files:
|
||
get:
|
||
tags: [Media]
|
||
summary: 文件列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- name: scene
|
||
in: query
|
||
schema:
|
||
type: string
|
||
- name: fileCategory
|
||
in: query
|
||
schema:
|
||
type: string
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
|
||
/admin/courses:
|
||
get:
|
||
tags: [CoursesAdmin]
|
||
summary: 课程列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- $ref: '#/components/parameters/Status'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
post:
|
||
tags: [CoursesAdmin]
|
||
summary: 新建课程
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/CourseInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/courses/{id}:
|
||
get:
|
||
tags: [CoursesAdmin]
|
||
summary: 课程详情
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
patch:
|
||
tags: [CoursesAdmin]
|
||
summary: 更新课程
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/CourseInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
delete:
|
||
tags: [CoursesAdmin]
|
||
summary: 删除课程
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/courses/{id}/status:
|
||
patch:
|
||
tags: [CoursesAdmin]
|
||
summary: 更新课程发布状态
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/StatusUpdate'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/works:
|
||
get:
|
||
tags: [WorksAdmin]
|
||
summary: 作品列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- $ref: '#/components/parameters/Status'
|
||
- name: keyword
|
||
in: query
|
||
schema:
|
||
type: string
|
||
- name: reviewStatus
|
||
in: query
|
||
schema:
|
||
type: string
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
post:
|
||
tags: [WorksAdmin]
|
||
summary: 新建作品
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/WorkInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/works/{id}:
|
||
get:
|
||
tags: [WorksAdmin]
|
||
summary: 作品详情
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
patch:
|
||
tags: [WorksAdmin]
|
||
summary: 更新作品
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/WorkInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
delete:
|
||
tags: [WorksAdmin]
|
||
summary: 删除作品
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/works/{id}/status:
|
||
patch:
|
||
tags: [WorksAdmin]
|
||
summary: 更新作品发布状态
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/StatusUpdate'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/works/{id}/images:
|
||
post:
|
||
tags: [WorksAdmin]
|
||
summary: 添加作品图片
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/WorkImageInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/work-images/{id}:
|
||
delete:
|
||
tags: [WorksAdmin]
|
||
summary: 删除作品图片
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/works/{id}/files:
|
||
post:
|
||
tags: [WorksAdmin]
|
||
summary: 添加作品附件
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/WorkFileInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/work-files/{id}:
|
||
delete:
|
||
tags: [WorksAdmin]
|
||
summary: 删除作品附件
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds:
|
||
get:
|
||
tags: [Evaluation]
|
||
summary: 评审轮次列表
|
||
parameters:
|
||
- name: competitionId
|
||
in: query
|
||
schema:
|
||
type: string
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 创建评审轮次
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/EvaluationRoundInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds/{id}:
|
||
get:
|
||
tags: [Evaluation]
|
||
summary: 评审轮次详情
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
patch:
|
||
tags: [Evaluation]
|
||
summary: 更新评审轮次
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/EvaluationRoundInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds/{id}/lock:
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 锁定评审轮次
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds/{id}/criteria:
|
||
get:
|
||
tags: [Evaluation]
|
||
summary: 评分指标列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 创建评分指标
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/EvaluationCriterionInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds/{id}/assignments:
|
||
get:
|
||
tags: [Evaluation]
|
||
summary: 评分任务列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 分配作品给评委
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/EvaluationAssignmentInput'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/my-assignments:
|
||
get:
|
||
tags: [Evaluation]
|
||
summary: 评委查看自己的评分任务
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
|
||
/admin/evaluation/assignments/{id}/scores:
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 提交评分
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ScoreSubmitRequest'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds/{id}/results:
|
||
get:
|
||
tags: [Evaluation]
|
||
summary: 评审结果汇总
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
|
||
/admin/evaluation/rounds/{id}/results/calculate:
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 重新计算评分排名
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/evaluation/rounds/{id}/results/publish:
|
||
post:
|
||
tags: [Evaluation]
|
||
summary: 发布评审结果
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/inquiries:
|
||
get:
|
||
tags: [InquiriesAdmin]
|
||
summary: 咨询线索列表
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- name: status
|
||
in: query
|
||
schema:
|
||
$ref: '#/components/schemas/InquiryStatus'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
|
||
/admin/inquiries/{id}:
|
||
get:
|
||
tags: [InquiriesAdmin]
|
||
summary: 咨询线索详情
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/admin/inquiries/{id}/status:
|
||
patch:
|
||
tags: [InquiriesAdmin]
|
||
summary: 更新咨询状态
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/InquiryStatusUpdate'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/site/config:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取站点基础配置
|
||
security: []
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/site/home:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取首页内容配置
|
||
security: []
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/competition:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取赛道页聚合配置
|
||
security: []
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/competition/schedule:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取赛程安排
|
||
security: []
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/competition/resources:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取参考资源
|
||
security: []
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/courses:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取课程列表
|
||
security: []
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- name: type
|
||
in: query
|
||
schema:
|
||
$ref: '#/components/schemas/CourseType'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
|
||
/courses/{id}:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取课程详情
|
||
security: []
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/works:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取作品列表
|
||
security: []
|
||
parameters:
|
||
- $ref: '#/components/parameters/Page'
|
||
- $ref: '#/components/parameters/PageSize'
|
||
- name: keyword
|
||
in: query
|
||
schema:
|
||
type: string
|
||
- name: category
|
||
in: query
|
||
schema:
|
||
type: string
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Paged'
|
||
|
||
/works/{id}:
|
||
get:
|
||
tags: [PublicSite]
|
||
summary: 获取作品详情
|
||
security: []
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
responses:
|
||
'200':
|
||
$ref: '#/components/responses/Ok'
|
||
|
||
/works/{id}/vote:
|
||
post:
|
||
tags: [PublicSite]
|
||
summary: 公众投票
|
||
security: []
|
||
parameters:
|
||
- $ref: '#/components/parameters/Id'
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/VoteRequest'
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/VoteResponse'
|
||
|
||
components:
|
||
securitySchemes:
|
||
bearerAuth:
|
||
type: http
|
||
scheme: bearer
|
||
bearerFormat: JWT
|
||
|
||
parameters:
|
||
Id:
|
||
name: id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
example: '1'
|
||
PageKey:
|
||
name: pageKey
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
example: home
|
||
Lang:
|
||
name: lang
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: string
|
||
default: zh-CN
|
||
Page:
|
||
name: page
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
minimum: 1
|
||
default: 1
|
||
PageSize:
|
||
name: pageSize
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
minimum: 1
|
||
maximum: 100
|
||
default: 20
|
||
Status:
|
||
name: status
|
||
in: query
|
||
required: false
|
||
schema:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
responses:
|
||
Ok:
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ApiResponse'
|
||
Paged:
|
||
description: Paged result
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/PagedResponse'
|
||
Unauthorized:
|
||
description: Unauthorized
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ErrorResponse'
|
||
|
||
schemas:
|
||
ApiResponse:
|
||
type: object
|
||
required: [code, message, data]
|
||
properties:
|
||
code:
|
||
type: integer
|
||
example: 0
|
||
message:
|
||
type: string
|
||
example: ok
|
||
data:
|
||
nullable: true
|
||
|
||
PagedResponse:
|
||
type: object
|
||
required: [code, message, data]
|
||
properties:
|
||
code:
|
||
type: integer
|
||
example: 0
|
||
message:
|
||
type: string
|
||
example: ok
|
||
data:
|
||
type: object
|
||
required: [list, page, pageSize, total]
|
||
properties:
|
||
list:
|
||
type: array
|
||
items:
|
||
type: object
|
||
page:
|
||
type: integer
|
||
example: 1
|
||
pageSize:
|
||
type: integer
|
||
example: 20
|
||
total:
|
||
type: integer
|
||
example: 100
|
||
|
||
ErrorResponse:
|
||
type: object
|
||
properties:
|
||
code:
|
||
type: integer
|
||
example: 40001
|
||
message:
|
||
type: string
|
||
example: 无权限
|
||
data:
|
||
nullable: true
|
||
|
||
PublishStatus:
|
||
type: string
|
||
enum: [draft, published, disabled, archived]
|
||
|
||
InquiryStatus:
|
||
type: string
|
||
enum: [pending, contacted, closed]
|
||
|
||
CourseType:
|
||
type: string
|
||
enum: [roadshow, training]
|
||
|
||
LoginRequest:
|
||
type: object
|
||
required: [username, password]
|
||
properties:
|
||
username:
|
||
type: string
|
||
example: admin
|
||
password:
|
||
type: string
|
||
format: password
|
||
example: admin123
|
||
|
||
LoginResponse:
|
||
type: object
|
||
properties:
|
||
accessToken:
|
||
type: string
|
||
refreshToken:
|
||
type: string
|
||
expiresAt:
|
||
type: string
|
||
format: date-time
|
||
user:
|
||
$ref: '#/components/schemas/AdminUser'
|
||
|
||
AdminUser:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: '1'
|
||
username:
|
||
type: string
|
||
example: admin
|
||
displayName:
|
||
type: string
|
||
example: 超级管理员
|
||
roles:
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: [super_admin]
|
||
permissions:
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: ['site:read', 'site:write', 'work:read']
|
||
|
||
Dashboard:
|
||
type: object
|
||
properties:
|
||
worksCount:
|
||
type: integer
|
||
publishedWorks:
|
||
type: integer
|
||
coursesCount:
|
||
type: integer
|
||
inquiriesCount:
|
||
type: integer
|
||
filesCount:
|
||
type: integer
|
||
pendingScores:
|
||
type: integer
|
||
|
||
SiteConfigInput:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: 模灵科技
|
||
englishName:
|
||
type: string
|
||
example: Soul of Model Technology
|
||
productName:
|
||
type: string
|
||
example: AI SoulMate
|
||
seo:
|
||
type: object
|
||
navigation:
|
||
type: array
|
||
items:
|
||
type: object
|
||
contact:
|
||
type: object
|
||
|
||
ContentSectionInput:
|
||
type: object
|
||
required: [sectionKey, sectionName, content]
|
||
properties:
|
||
sectionKey:
|
||
type: string
|
||
example: hero
|
||
sectionName:
|
||
type: string
|
||
example: 首页 Hero
|
||
title:
|
||
type: string
|
||
subtitle:
|
||
type: string
|
||
content:
|
||
type: object
|
||
description: 区块内容 JSON
|
||
sortOrder:
|
||
type: integer
|
||
default: 0
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
PublishRequest:
|
||
type: object
|
||
properties:
|
||
publishNote:
|
||
type: string
|
||
example: 更新赛程时间
|
||
|
||
CompetitionInput:
|
||
type: object
|
||
required: [code, slug, title]
|
||
properties:
|
||
code:
|
||
type: string
|
||
example: smart-new-fashion-2026
|
||
slug:
|
||
type: string
|
||
example: smart-fashion
|
||
title:
|
||
type: string
|
||
example: 智·造新时尚
|
||
subtitle:
|
||
type: string
|
||
description:
|
||
type: string
|
||
coverUrl:
|
||
type: string
|
||
officialUrl:
|
||
type: string
|
||
organizer:
|
||
type: string
|
||
contractor:
|
||
type: string
|
||
startAt:
|
||
type: string
|
||
format: date-time
|
||
endAt:
|
||
type: string
|
||
format: date-time
|
||
lang:
|
||
type: string
|
||
default: zh-CN
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
ScheduleInput:
|
||
type: object
|
||
required: [title]
|
||
properties:
|
||
title:
|
||
type: string
|
||
example: 报名与命题发布
|
||
dateText:
|
||
type: string
|
||
example: 2026.04
|
||
startAt:
|
||
type: string
|
||
format: date-time
|
||
endAt:
|
||
type: string
|
||
format: date-time
|
||
description:
|
||
type: string
|
||
sortOrder:
|
||
type: integer
|
||
default: 0
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
ResourceInput:
|
||
type: object
|
||
required: [title, resourceType]
|
||
properties:
|
||
title:
|
||
type: string
|
||
example: 作品提交模板
|
||
description:
|
||
type: string
|
||
resourceType:
|
||
type: string
|
||
enum: [pdf, zip, image, link, video]
|
||
category:
|
||
type: string
|
||
fileId:
|
||
type: string
|
||
fileUrl:
|
||
type: string
|
||
externalUrl:
|
||
type: string
|
||
isDownloadable:
|
||
type: boolean
|
||
default: false
|
||
openAt:
|
||
type: string
|
||
format: date-time
|
||
sortOrder:
|
||
type: integer
|
||
default: 0
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
UploadPolicyRequest:
|
||
type: object
|
||
required: [fileName, mimeType, size, scene, usage]
|
||
properties:
|
||
fileName:
|
||
type: string
|
||
example: cover.png
|
||
mimeType:
|
||
type: string
|
||
example: image/png
|
||
size:
|
||
type: integer
|
||
example: 204800
|
||
scene:
|
||
type: string
|
||
enum: [site, competition, course, work, resource]
|
||
usage:
|
||
type: string
|
||
enum: [cover, gallery, video, model, attachment, logo, resource]
|
||
|
||
UploadPolicyResponse:
|
||
type: object
|
||
properties:
|
||
uploadUrl:
|
||
type: string
|
||
method:
|
||
type: string
|
||
example: POST
|
||
fileKey:
|
||
type: string
|
||
formData:
|
||
type: object
|
||
expiresAt:
|
||
type: string
|
||
format: date-time
|
||
|
||
UploadCompleteRequest:
|
||
type: object
|
||
required: [fileKey, originalName, url, mimeType, size]
|
||
properties:
|
||
fileKey:
|
||
type: string
|
||
originalName:
|
||
type: string
|
||
url:
|
||
type: string
|
||
mimeType:
|
||
type: string
|
||
extension:
|
||
type: string
|
||
size:
|
||
type: integer
|
||
width:
|
||
type: integer
|
||
height:
|
||
type: integer
|
||
duration:
|
||
type: integer
|
||
scene:
|
||
type: string
|
||
fileCategory:
|
||
type: string
|
||
|
||
FileRecord:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: string
|
||
fileKey:
|
||
type: string
|
||
originalName:
|
||
type: string
|
||
url:
|
||
type: string
|
||
mimeType:
|
||
type: string
|
||
extension:
|
||
type: string
|
||
size:
|
||
type: string
|
||
width:
|
||
type: integer
|
||
nullable: true
|
||
height:
|
||
type: integer
|
||
nullable: true
|
||
duration:
|
||
type: integer
|
||
nullable: true
|
||
scene:
|
||
type: string
|
||
fileCategory:
|
||
type: string
|
||
storageProvider:
|
||
type: string
|
||
example: aliyun-oss
|
||
createdAt:
|
||
type: string
|
||
format: date-time
|
||
|
||
CourseInput:
|
||
type: object
|
||
required: [type, title]
|
||
properties:
|
||
courseNo:
|
||
type: string
|
||
example: rs-01
|
||
type:
|
||
$ref: '#/components/schemas/CourseType'
|
||
title:
|
||
type: string
|
||
example: 北服 × 模灵联合宣讲回放
|
||
summary:
|
||
type: string
|
||
description:
|
||
type: string
|
||
coverUrl:
|
||
type: string
|
||
coverFileId:
|
||
type: string
|
||
videoUrl:
|
||
type: string
|
||
videoFileId:
|
||
type: string
|
||
externalVideoUrl:
|
||
type: string
|
||
sourceType:
|
||
type: string
|
||
enum: [oss, external]
|
||
partner:
|
||
type: string
|
||
speaker:
|
||
type: string
|
||
durationText:
|
||
type: string
|
||
sortOrder:
|
||
type: integer
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
StatusUpdate:
|
||
type: object
|
||
required: [status]
|
||
properties:
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
WorkInput:
|
||
type: object
|
||
required: [title]
|
||
properties:
|
||
competitionId:
|
||
type: string
|
||
workNo:
|
||
type: string
|
||
example: SMT-2026-018
|
||
title:
|
||
type: string
|
||
example: 青金缕 · 可穿戴胸针
|
||
category:
|
||
type: string
|
||
direction:
|
||
type: string
|
||
authorName:
|
||
type: string
|
||
school:
|
||
type: string
|
||
coverUrl:
|
||
type: string
|
||
coverFileId:
|
||
type: string
|
||
modelUrl:
|
||
type: string
|
||
modelFileId:
|
||
type: string
|
||
summary:
|
||
type: string
|
||
designSpec:
|
||
type: object
|
||
aigcSummary:
|
||
type: string
|
||
prompt:
|
||
type: string
|
||
generationParams:
|
||
type: object
|
||
materialStatus:
|
||
type: string
|
||
enum: [pending_submit, submitted, qualified, rejected]
|
||
reviewStatus:
|
||
type: string
|
||
enum: [none, reviewing, finalist, winner, rejected]
|
||
featured:
|
||
type: boolean
|
||
voteCount:
|
||
type: integer
|
||
sortOrder:
|
||
type: integer
|
||
status:
|
||
$ref: '#/components/schemas/PublishStatus'
|
||
|
||
WorkImageInput:
|
||
type: object
|
||
required: [imageUrl]
|
||
properties:
|
||
fileId:
|
||
type: string
|
||
imageUrl:
|
||
type: string
|
||
altText:
|
||
type: string
|
||
sortOrder:
|
||
type: integer
|
||
default: 0
|
||
|
||
WorkFileInput:
|
||
type: object
|
||
required: [fileName, fileUrl]
|
||
properties:
|
||
fileId:
|
||
type: string
|
||
fileName:
|
||
type: string
|
||
fileUrl:
|
||
type: string
|
||
fileType:
|
||
type: string
|
||
fileSize:
|
||
type: integer
|
||
sortOrder:
|
||
type: integer
|
||
default: 0
|
||
|
||
EvaluationRoundInput:
|
||
type: object
|
||
required: [competitionId, name, roundType]
|
||
properties:
|
||
competitionId:
|
||
type: string
|
||
name:
|
||
type: string
|
||
example: 初评
|
||
roundType:
|
||
type: string
|
||
enum: [preliminary, semi_final, final]
|
||
description:
|
||
type: string
|
||
expertWeight:
|
||
type: number
|
||
format: float
|
||
example: 80
|
||
publicVoteWeight:
|
||
type: number
|
||
format: float
|
||
example: 20
|
||
startAt:
|
||
type: string
|
||
format: date-time
|
||
endAt:
|
||
type: string
|
||
format: date-time
|
||
status:
|
||
type: string
|
||
enum: [draft, open, closed, locked, published]
|
||
|
||
EvaluationCriterionInput:
|
||
type: object
|
||
required: [name, maxScore, weight]
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: 创意表达
|
||
description:
|
||
type: string
|
||
maxScore:
|
||
type: number
|
||
format: float
|
||
example: 100
|
||
weight:
|
||
type: number
|
||
format: float
|
||
example: 30
|
||
sortOrder:
|
||
type: integer
|
||
default: 0
|
||
|
||
EvaluationAssignmentInput:
|
||
type: object
|
||
required: [workIds, judgeIds]
|
||
properties:
|
||
workIds:
|
||
type: array
|
||
items:
|
||
type: string
|
||
judgeIds:
|
||
type: array
|
||
items:
|
||
type: string
|
||
mode:
|
||
type: string
|
||
enum: [manual, random, category]
|
||
default: manual
|
||
|
||
ScoreSubmitRequest:
|
||
type: object
|
||
required: [scores]
|
||
properties:
|
||
scores:
|
||
type: array
|
||
items:
|
||
type: object
|
||
required: [criterionId, score]
|
||
properties:
|
||
criterionId:
|
||
type: string
|
||
score:
|
||
type: number
|
||
format: float
|
||
comment:
|
||
type: string
|
||
overallComment:
|
||
type: string
|
||
submit:
|
||
type: boolean
|
||
description: true 表示提交并进入 submitted 状态,false 表示暂存
|
||
|
||
InquiryStatusUpdate:
|
||
type: object
|
||
required: [status]
|
||
properties:
|
||
status:
|
||
$ref: '#/components/schemas/InquiryStatus'
|
||
remark:
|
||
type: string
|
||
|
||
VoteRequest:
|
||
type: object
|
||
required: [visitorId]
|
||
properties:
|
||
visitorId:
|
||
type: string
|
||
example: browser-fingerprint-id
|
||
|
||
VoteResponse:
|
||
type: object
|
||
properties:
|
||
workId:
|
||
type: string
|
||
voteCount:
|
||
type: integer
|
||
voted:
|
||
type: boolean
|