{
  "openapi": "3.0.1",
  "info": {
    "title": "默认模块",
    "description": "",
    "version": "1.0.0"
  },
  "tags": [],
  "paths": {
    "/api/v1/project-init/sse/submit-task": {
      "post": {
        "summary": "通过 SSE 提交项目初始化任务",
        "deprecated": false,
        "description": "使用通用 SSE 通道，通过 userId 推送进度",
        "tags": [],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "用户ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
            "schema": {
              "type": "string",
              "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "description": "项目资料文件",
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": ["file"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseResponseMapObject",
                  "description": "提交结果"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/project-init/my-tasks": {
      "get": {
        "summary": "查询我的任务列表",
        "deprecated": false,
        "description": "根据当前登录用户的token查询其所有任务",
        "tags": [],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
            "schema": {
              "type": "string",
              "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseResponseListProjectInitTaskVO",
                  "description": "任务列表"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/project-init/my-tasks/stats": {
      "get": {
        "summary": "查询我的任务统计信息",
        "deprecated": false,
        "description": "",
        "tags": [],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
            "schema": {
              "type": "string",
              "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseResponseMapObject",
                  "description": "统计信息"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/project-init/task/{taskId}": {
      "get": {
        "summary": "查询单个任务状态",
        "deprecated": false,
        "description": "",
        "tags": [],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "description": "任务ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "",
            "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
            "schema": {
              "type": "string",
              "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseResponseProjectInitTaskVO",
                  "description": "任务状态"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "ProjectInfo": {
        "type": "object",
        "properties": {
          "project_name": {
            "type": "string",
            "description": ""
          },
          "project_type": {
            "type": "string",
            "description": ""
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "objectives": {
            "type": "string",
            "description": ""
          },
          "plan_start_date": {
            "type": "string",
            "description": ""
          },
          "plan_end_date": {
            "type": "string",
            "description": ""
          },
          "budget": {
            "type": "number",
            "description": ""
          },
          "currency": {
            "type": "string",
            "description": ""
          },
          "priority": {
            "type": "string",
            "description": ""
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": ""
          }
        }
      },
      "MilestoneInfo": {
        "type": "object",
        "properties": {
          "milestone_name": {
            "type": "string",
            "description": ""
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "plan_date": {
            "type": "string",
            "description": ""
          },
          "deliverables": {
            "type": "string",
            "description": ""
          },
          "owner_role": {
            "type": "string",
            "description": ""
          }
        }
      },
      "TaskInfo": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "description": ""
          },
          "task_name": {
            "type": "string",
            "description": ""
          },
          "parent_task_id": {
            "type": "string",
            "description": ""
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "plan_start_date": {
            "type": "string",
            "description": ""
          },
          "plan_end_date": {
            "type": "string",
            "description": ""
          },
          "estimated_hours": {
            "type": "integer",
            "description": ""
          },
          "priority": {
            "type": "string",
            "description": ""
          },
          "assignee_role": {
            "type": "string",
            "description": ""
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": ""
          },
          "deliverables": {
            "type": "string",
            "description": ""
          }
        }
      },
      "BaseResponseMapObject": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "data": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "processing": {
                "type": "integer"
              },
              "completed": {
                "type": "null"
              },
              "failed": {
                "type": "null"
              }
            },
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          }
        }
      },
      "MemberInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": ""
          },
          "role_code": {
            "type": "string",
            "description": ""
          },
          "responsibility": {
            "type": "string",
            "description": ""
          },
          "department": {
            "type": "string",
            "description": ""
          },
          "weekly_hours": {
            "type": "integer",
            "description": ""
          }
        }
      },
      "ResourceInfo": {
        "type": "object",
        "properties": {
          "resource_name": {
            "type": "string",
            "description": ""
          },
          "resource_type": {
            "type": "string",
            "description": ""
          },
          "quantity": {
            "type": "number",
            "description": ""
          },
          "unit": {
            "type": "string",
            "description": ""
          },
          "unit_price": {
            "type": "number",
            "description": ""
          },
          "supplier": {
            "type": "string",
            "description": ""
          }
        }
      },
      "RiskInfo": {
        "type": "object",
        "properties": {
          "risk_name": {
            "type": "string",
            "description": ""
          },
          "category": {
            "type": "string",
            "description": ""
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "probability": {
            "type": "integer",
            "description": ""
          },
          "impact": {
            "type": "integer",
            "description": ""
          },
          "mitigation_plan": {
            "type": "string",
            "description": ""
          }
        }
      },
      "TimelineNodeInfo": {
        "type": "object",
        "properties": {
          "node_name": {
            "type": "string",
            "description": ""
          },
          "node_type": {
            "type": "string",
            "description": ""
          },
          "plan_date": {
            "type": "string",
            "description": ""
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "kb_scope": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": ""
          }
        }
      },
      "ProjectInitResult": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ProjectInfo",
            "description": "项目基本信息"
          },
          "milestones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MilestoneInfo",
              "description": "cn.yinlihupo.domain.dto.ProjectInitResult.MilestoneInfo"
            },
            "description": "里程碑列表"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskInfo",
              "description": "cn.yinlihupo.domain.dto.ProjectInitResult.TaskInfo"
            },
            "description": "任务清单"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberInfo",
              "description": "cn.yinlihupo.domain.dto.ProjectInitResult.MemberInfo"
            },
            "description": "项目成员"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceInfo",
              "description": "cn.yinlihupo.domain.dto.ProjectInitResult.ResourceInfo"
            },
            "description": "资源需求"
          },
          "risks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RiskInfo",
              "description": "cn.yinlihupo.domain.dto.ProjectInitResult.RiskInfo"
            },
            "description": "风险识别"
          },
          "timeline_nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineNodeInfo",
              "description": "cn.yinlihupo.domain.dto.ProjectInitResult.TimelineNodeInfo"
            },
            "description": "时间节点"
          }
        }
      },
      "ProjectInitTaskVO": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string",
            "description": "任务ID"
          },
          "userId": {
            "type": "integer",
            "description": "用户ID（任务所属用户）",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "description": "任务状态: pending-待处理, processing-处理中, completed-已完成, failed-失败"
          },
          "statusDesc": {
            "type": "string",
            "description": "状态描述"
          },
          "progress": {
            "type": "integer",
            "description": "当前进度百分比 (0-100)"
          },
          "progressMessage": {
            "type": "string",
            "description": "进度描述信息"
          },
          "originalFilename": {
            "type": "string",
            "description": "原始文件名"
          },
          "createTime": {
            "type": "string",
            "description": "任务创建时间"
          },
          "startTime": {
            "type": "string",
            "description": "任务开始处理时间"
          },
          "completeTime": {
            "type": "string",
            "description": "任务完成时间"
          },
          "result": {
            "$ref": "#/components/schemas/ProjectInitResult",
            "description": "处理结果（仅当status=completed时有值）"
          },
          "errorMessage": {
            "type": "string",
            "description": "错误信息（仅当status=failed时有值）"
          }
        }
      },
      "BaseResponseListProjectInitTaskVO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectInitTaskVO",
              "description": "项目初始化异步任务VO"
            },
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          }
        }
      },
      "BaseResponseProjectInitTaskVO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "data": {
            "$ref": "#/components/schemas/ProjectInitTaskVO",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          }
        }
      }
    },
    "responses": {},
    "securitySchemes": {}
  },
  "servers": [],
  "security": []
}
