Files
ittoview/src/types/timeline.ts
2026-03-22 14:14:47 +00:00

31 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 时间轴数据类型定义
* 用于软考高项时间类知识点的结构化存储与展示
*/
// 时间精度
export type TimelineTimePrecision = 'year' | 'month' | 'day';
// 来源锚点类型
export type SourceAnchorType =
| 'meeting' // 会议
| 'document' // 文件
| 'organization' // 组织
| 'person' // 人物
| 'policy' // 政策
| 'report' // 报告
| 'other'; // 其他
// 时间轴节点
export interface TimelineItem {
id: string; // 唯一标识,如 TL001
timeText: string; // 原文中的显式时间如“2035年”
sortKey: string; // 排序键如“20350000”
timePrecision: TimelineTimePrecision; // 时间精度:年/月/日
theme: string; // 所属主题/章节
excerpt: string; // 原文摘录
sourceAnchor?: string; // 来源锚点,如“党的十九届五中全会”
sourceAnchorType?: SourceAnchorType; // 来源锚点类型
sourcePosition?: string; // 教材定位信息如“第3章 第2节”
}