forked from dangod/lifekline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (46 loc) · 1.3 KB
/
types.ts
File metadata and controls
55 lines (46 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
export enum Gender {
MALE = 'Male',
FEMALE = 'Female',
}
export interface UserInput {
name?: string;
gender: Gender;
birthYear: string; // 出生年份 (如 1990)
yearPillar: string; // 年柱
monthPillar: string; // 月柱
dayPillar: string; // 日柱
hourPillar: string; // 时柱
startAge: string; // 起运年龄 (虚岁) - Changed to string to handle input field state easily, parse later
firstDaYun: string; // 第一步大运干支
}
export interface KLinePoint {
age: number;
year: number;
ganZhi: string; // 当年的流年干支 (如:甲辰)
daYun?: string; // 当前所在的大运(如:甲子大运),用于图表标记
open: number;
close: number;
high: number;
low: number;
score: number;
reason: string; // 这里现在需要存储详细的流年描述
}
export interface AnalysisData {
bazi: string[]; // [Year, Month, Day, Hour] pillars
summary: string;
summaryScore: number; // 0-10
industry: string;
industryScore: number; // 0-10
wealth: string;
wealthScore: number; // 0-10
marriage: string;
marriageScore: number; // 0-10
health: string;
healthScore: number; // 0-10
family: string;
familyScore: number; // 0-10
}
export interface LifeDestinyResult {
chartData: KLinePoint[];
analysis: AnalysisData;
}