feat: 完善代理商端业务逻辑与前后端框架

主要更新:
- 更新代理商端文档,明确项目由品牌方分配流程
- 新增Brief配置详情页(已配置)设计稿
- 完善工作台紧急待办中品牌新任务功能
- 整理Pencil设计文件中代理商端页面顺序
- 新增后端FastAPI框架及核心API
- 新增前端Next.js页面和组件库
- 添加.gitignore排除构建和缓存文件

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-02-05 19:27:31 +08:00
co-authored by Claude Opus 4.5
parent d52509d630
commit e4959d584f
132 changed files with 58539 additions and 21353 deletions
+30
View File
@@ -0,0 +1,30 @@
'use client'
export type UserRole = 'creator' | 'agency' | 'brand'
export interface User {
id: string
name: string
email: string
role: UserRole
avatar?: string
tenantId: string
tenantName: string
}
export interface LoginCredentials {
email: string
password: string
}
export interface AuthState {
user: User | null
isAuthenticated: boolean
isLoading: boolean
}
export interface AuthContextType extends AuthState {
login: (credentials: LoginCredentials) => Promise<{ success: boolean; error?: string }>
logout: () => void
switchRole: (role: UserRole) => void
}
+75
View File
@@ -0,0 +1,75 @@
/**
* 视频审核相关类型定义
*/
export type TaskStatus = 'pending' | 'processing' | 'completed' | 'failed'
export type RiskLevel = 'high' | 'medium' | 'low'
export type ViolationType =
| 'forbidden_word'
| 'competitor_logo'
| 'duration_short'
| 'mention_missing'
export type ViolationSource = 'speech' | 'subtitle' | 'visual'
export interface Violation {
id: string
type: ViolationType
content: string
timestamp: number
source: ViolationSource
riskLevel: RiskLevel
suggestion: string
}
export interface SoftWarning {
id: string
type: string
content: string
suggestion: string
}
export interface ReviewTask {
reviewId: string
title?: string
status: TaskStatus
progress?: number
currentStep?: string
score?: number
summary?: string
violations?: Violation[]
softWarnings?: SoftWarning[]
createdAt: string
completedAt?: string
}
export interface VideoReviewRequest {
videoUrl?: string
platform: string
brandId?: string
creatorId?: string
title?: string
}
export interface VideoReviewResponse {
reviewId: string
status: TaskStatus
}
export interface ReviewProgressResponse {
reviewId: string
status: TaskStatus
progress: number
currentStep: string
}
export interface ReviewResultResponse {
reviewId: string
status: TaskStatus
score: number
summary: string
violations: Violation[]
softWarnings: SoftWarning[]
}
+36
View File
@@ -0,0 +1,36 @@
export type ApiTaskStatus =
| 'pending'
| 'processing'
| 'completed'
| 'failed'
| 'approved'
| 'rejected'
export interface TaskResponse {
task_id: string
video_url?: string | null
script_content?: string | null
script_file_url?: string | null
has_script: boolean
has_video: boolean
platform: string
creator_id: string
status: ApiTaskStatus
created_at: string
}
export interface TaskListResponse {
items: TaskResponse[]
total: number
page: number
page_size: number
}
export interface TaskScriptUploadRequest {
script_content?: string
script_file_url?: string
}
export interface TaskVideoUploadRequest {
video_url: string
}