/** * ITTO数据类型定义 * PMP项目管理ITTO可视化学习平台 */ // 敏捷裁剪因素项 export interface TailoringFactor { title: string; // 因素标题 description: string; // 因素描述 } // 知识领域 export interface KnowledgeArea { id: string; // 如 "KA01" name: string; // 如 "项目整合管理" nameEn: string; // 如 "Project Integration Management" chapter: number; // PMBOK章节号 4-13 order: number; // 排序序号 1-10 color: string; // 主题色 description: string; // 简要描述 processCount: number; // 包含的过程数量 tailoringFactors?: TailoringFactor[]; // 敏捷裁剪因素(可选) } // 过程组 export interface ProcessGroup { id: string; // 如 "PG01" name: string; // 如 "启动过程组" nameEn: string; // 如 "Initiating Process Group" order: number; // 排序序号 1-5 color: string; // 主题色 description: string; // 简要描述 processCount: number; // 包含的过程数量 } // 5W1H记忆辅助信息 export interface Process5W1H { who: string; // 谁负责执行 what: string; // 做什么(核心目的) when: string; // 什么时候执行 where: string; // 在哪里/什么场景执行 why: string; // 为什么要执行(价值意义) how: string; // 如何执行(关键方法) } // 明细项 export interface DetailItem { id?: string; // 可选:若明细在工具库里注册,可复用该 ID label: string; // 明细名称 description?: string; // 明细描述 } // 过程实体使用(支持明细) export interface ProcessEntityUse { id: string; // 实体ID(工件/工具ID) detail?: DetailItem[]; // 明细列表 note?: string; // 针对此过程的补充说明 } // 过程引用类型(字符串ID 或 带明细的对象) export type ProcessRef = string | ProcessEntityUse; // 过程 export interface Process { id: string; // 如 "P4.1" code: string; // 如 "4.1" name: string; // 如 "制定项目章程" nameEn: string; // 如 "Develop Project Charter" knowledgeAreaId: string; // 所属知识领域ID processGroupId: string; // 所属过程组ID order: number; // 在知识领域内的序号 inputs: ProcessRef[]; // 输入工件ID列表(支持明细) tools: ProcessRef[]; // 工具与技术ID列表(支持明细) outputs: ProcessRef[]; // 输出工件ID列表(支持明细) purpose?: string; // 本过程的主要作用 w5h1?: Process5W1H; // 5W1H记忆辅助信息 } // 工件类别 export type ArtifactCategory = | 'document' // 文档 | 'plan' // 计划 | 'baseline' // 基准 | 'report' // 报告 | 'register' // 登记册 | 'log' // 日志 | 'deliverable' // 可交付成果 | 'other'; // 其他 // 工件/文档 export interface Artifact { id: string; // 如 "A001" name: string; // 如 "项目章程" nameEn: string; // 如 "Project Charter" category: ArtifactCategory; description?: string; } // 工具类型 export type ToolType = | 'tool' // 工具 | 'technique' // 技术 | 'method' // 方法 | 'skill' // 技能 | 'meeting'; // 会议 // 工具与技术 export interface ToolTechnique { id: string; // 如 "TT001" name: string; // 如 "专家判断" nameEn: string; // 如 "Expert Judgment" type: ToolType; category: string; // 分类 description?: string; } // 学习掌握程度 export type MasteryLevel = 'familiar' | 'fuzzy' | 'unfamiliar'; // 学习记录 export interface LearningRecord { id: string; processId: string; masteryLevel: MasteryLevel; reviewCount: number; correctCount: number; lastReviewAt: Date; nextReviewAt: Date; // 基于间隔重复算法计算 } // 题目类型 export type QuestionType = 'choice' | 'fill' | 'match'; // 错题记录 export interface WrongAnswer { id: string; questionId: string; questionType: QuestionType; userAnswer: string; correctAnswer: string; createdAt: Date; reviewed: boolean; } // 学习统计 export interface LearningStats { totalStudyTime: number; // 总学习时长(分钟) totalQuestions: number; // 总答题数 correctRate: number; // 正确率 masteredCount: number; // 已掌握过程数 streakDays: number; // 连续学习天数 lastStudyDate: Date; } // 数据流向关系 export interface DataFlow { sourceProcessId: string; // 源过程ID targetProcessId: string; // 目标过程ID artifactId: string; // 流转的工件ID }