/** * 技术规格说明书分章节存储 * 用于处理大型项目的技术规格说明书生成,支持分章节存储和最终合并渲染 */ /** * 技术规格说明书项目 */ export interface TechSpecProject { id: number; uuid: string; projectName: string; moduleName: string; projectPath: string; status: "analyzing" | "generating" | "completed" | "failed"; totalModules: number; processedModules: number; totalFiles: number; processedFiles: number; createdAt: Date; updatedAt: Date; completedAt?: Date; } /** * 章节类型枚举 */ export type ChapterType = "project_overview" | "service_interface_list" | "interface_design" | "database_design" | "tech_solution" | "business_exception" | "appendix"; /** * 章节内容 */ export interface TechSpecChapter { id: number; uuid: string; projectUuid: string; chapterType: ChapterType; chapterTitle: string; chapterOrder: number; content: string; moduleSource?: string; fileCount: number; status: "pending" | "processing" | "completed" | "failed"; errorMessage?: string; createdAt: Date; updatedAt: Date; } /** * 模块处理状态 */ export interface ModuleProcessStatus { id: number; uuid: string; projectUuid: string; moduleName: string; moduleType: "java" | "typescript" | "other"; totalFiles: number; processedFiles: number; status: "pending" | "processing" | "completed" | "failed"; startedAt?: Date; completedAt?: Date; errorMessage?: string; createdAt: Date; updatedAt: Date; } /** * 文件处理记录 */ export interface FileProcessRecord { id: number; uuid: string; projectUuid: string; moduleUuid: string; filePath: string; fileName: string; fileType: "controller" | "service" | "entity" | "dto" | "config" | "other"; extractedData?: string; status: "pending" | "processing" | "completed" | "failed" | "skipped"; errorMessage?: string; processingTime: number; createdAt: Date; updatedAt: Date; } export declare const techSpecDbOperations: { createTechSpecProject: (data: { uuid: string; projectName: string; moduleName: string; projectPath: string; totalModules: number; totalFiles: number; }) => Promise; getTechSpecProject: (uuid: string) => Promise; getAllTechSpecProjects: () => Promise; updateTechSpecProject: (uuid: string, data: Partial) => Promise; createTechSpecChapter: (data: { uuid: string; projectUuid: string; chapterType: ChapterType; chapterTitle: string; chapterOrder: number; content: string; moduleSource?: string; fileCount: number; }) => Promise; getTechSpecChapters: (projectUuid: string) => Promise; getTechSpecChaptersByType: (projectUuid: string, chapterType: ChapterType) => Promise; updateTechSpecChapter: (uuid: string, data: Partial) => Promise; createModuleProcessStatus: (data: { uuid: string; projectUuid: string; moduleName: string; moduleType: "java" | "typescript" | "other"; totalFiles: number; }) => Promise; getModuleProcessStatuses: (projectUuid: string) => Promise; updateModuleProcessStatus: (uuid: string, data: Partial) => Promise; createFileProcessRecord: (data: { uuid: string; projectUuid: string; moduleUuid: string; filePath: string; fileName: string; fileType: "controller" | "service" | "entity" | "dto" | "config" | "other"; extractedData?: string; processingTime: number; }) => Promise; getFileProcessRecords: (projectUuid: string) => Promise; getFileProcessRecordsByModule: (moduleUuid: string) => Promise; mergeChaptersByType: (projectUuid: string, chapterType: ChapterType) => Promise; cleanupProject: (projectUuid: string) => Promise; getProjectStatistics: (projectUuid: string) => Promise<{ totalChapters: number; completedChapters: number; totalModules: number; completedModules: number; totalFiles: number; completedFiles: number; chaptersByType: Record; }>; }; //# sourceMappingURL=tech-spec-storage.d.ts.map