- 后端新增: Project CRUD / Brief CRUD / 组织关系管理 / 工作台统计 / SSE 推送 / 认证依赖注入 - 后端完善: 任务 API 全流程(创建/审核/申诉) + Task Service + Task Schema - 前端修复: login 页面 localStorage key 错误 (miaosi_auth -> miaosi_user) - 前端对齐: types/task.ts 与后端 TaskStage/TaskResponse 完全对齐 - 前端新增: project/brief/organization/dashboard 类型定义 - 前端补全: api.ts 新增 30+ API 方法覆盖所有后端接口 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
49 lines
905 B
TypeScript
49 lines
905 B
TypeScript
/**
|
|
* 项目相关类型定义
|
|
* 与后端 ProjectResponse 对齐
|
|
*/
|
|
|
|
export interface AgencySummary {
|
|
id: string
|
|
name: string
|
|
logo?: string | null
|
|
}
|
|
|
|
export interface ProjectResponse {
|
|
id: string
|
|
name: string
|
|
description?: string | null
|
|
brand_id: string
|
|
brand_name?: string | null
|
|
status: string
|
|
start_date?: string | null
|
|
deadline?: string | null
|
|
agencies: AgencySummary[]
|
|
task_count: number
|
|
created_at: string
|
|
updated_at: string
|
|
}
|
|
|
|
export interface ProjectListResponse {
|
|
items: ProjectResponse[]
|
|
total: number
|
|
page: number
|
|
page_size: number
|
|
}
|
|
|
|
export interface ProjectCreateRequest {
|
|
name: string
|
|
description?: string
|
|
start_date?: string
|
|
deadline?: string
|
|
agency_ids?: string[]
|
|
}
|
|
|
|
export interface ProjectUpdateRequest {
|
|
name?: string
|
|
description?: string
|
|
start_date?: string
|
|
deadline?: string
|
|
status?: 'active' | 'completed' | 'archived'
|
|
}
|