video-compliance-ai/backend/BACKEND_TODO.md
Your Name a5a005db0c feat: 完善审核台文件预览与消息通知系统
主要更新:
- 新增 FilePreview 通用组件,支持视频/图片/PDF 内嵌预览
- 审核详情页添加文件信息卡片、预览/下载功能
- 审核列表和详情页添加申诉标识和申诉理由显示
- 完善三端消息通知系统(达人/代理商/品牌)
- 新增达人 Brief 查看页面
- 新增品牌方消息中心页面
- 创建后端开发备忘文档

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 12:20:47 +08:00

95 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 后端开发备忘
## 文件预览相关 API
### 1. 文件上传与存储
- 达人上传脚本文件(支持 .docx, .pdf, .xlsx, .txt 等)
- 达人上传视频文件(支持 .mp4, .mov, .webm 等)
- 文件存储到 OSS/S3返回访问 URL
### 2. 文件访问 API
```
GET /api/files/:fileId
返回:{ url: "文件访问URL", fileName, fileSize, fileType, uploadedAt }
```
### 3. 文件类型转换(可选,提升体验)
- Word (.docx) → PDF
- Excel (.xlsx) → PDF
- PPT (.pptx) → PDF
- 使用 LibreOffice 或 Pandoc 实现
### 4. 视频流服务
- 支持视频分段加载Range 请求)
- 支持视频缩略图生成
---
## 审核相关 API
### 脚本审核
```
GET /api/agency/review/scripts # 待审脚本列表
GET /api/agency/review/scripts/:id # 脚本详情含文件URL、AI分析结果
POST /api/agency/review/scripts/:id/approve # 通过
POST /api/agency/review/scripts/:id/reject # 驳回
POST /api/agency/review/scripts/:id/force-pass # 强制通过
```
### 视频审核
```
GET /api/agency/review/videos # 待审视频列表
GET /api/agency/review/videos/:id # 视频详情含文件URL、AI分析结果
POST /api/agency/review/videos/:id/approve # 通过
POST /api/agency/review/videos/:id/reject # 驳回
POST /api/agency/review/videos/:id/force-pass # 强制通过
```
### 品牌方终审
```
GET /api/brand/review/scripts # 待终审脚本列表
GET /api/brand/review/scripts/:id # 脚本详情
POST /api/brand/review/scripts/:id/approve # 终审通过
POST /api/brand/review/scripts/:id/reject # 终审驳回
GET /api/brand/review/videos # 待终审视频列表
GET /api/brand/review/videos/:id # 视频详情
POST /api/brand/review/videos/:id/approve # 终审通过
POST /api/brand/review/videos/:id/reject # 终审驳回
```
---
## 申诉相关字段
审核列表和详情需要包含:
- `isAppeal: boolean` - 是否为申诉
- `appealReason: string` - 申诉理由
- `appealCount: number` - 第几次申诉
---
## 文件数据结构
```typescript
interface FileInfo {
id: string
fileName: string
fileSize: string // "1.5 MB"
fileType: string // "video/mp4", "application/pdf", etc.
fileUrl: string // 访问URL
uploadedAt: string // ISO 时间
// 视频特有
duration?: number // 秒
thumbnail?: string // 缩略图URL
}
```
---
## 注意事项
1. 文件 URL 需要支持跨域访问CORS
2. 视频需要支持 Range 请求实现分段加载
3. 敏感文件考虑使用签名 URL有效期限制