125 lines
3.4 KiB
TypeScript
125 lines
3.4 KiB
TypeScript
/**
|
|
* ITTO数据类型定义
|
|
* PMP项目管理ITTO可视化学习平台
|
|
*/
|
|
|
|
// 知识领域
|
|
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; // 包含的过程数量
|
|
}
|
|
|
|
// 过程组
|
|
export interface ProcessGroup {
|
|
id: string; // 如 "PG01"
|
|
name: string; // 如 "启动过程组"
|
|
nameEn: string; // 如 "Initiating Process Group"
|
|
order: number; // 排序序号 1-5
|
|
color: string; // 主题色
|
|
description: string; // 简要描述
|
|
processCount: number; // 包含的过程数量
|
|
}
|
|
|
|
// 过程
|
|
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: string[]; // 输入工件ID列表
|
|
tools: string[]; // 工具与技术ID列表
|
|
outputs: string[]; // 输出工件ID列表
|
|
}
|
|
|
|
// 工件类别
|
|
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
|
|
}
|