-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathYamlTimeline.cs
42 lines (25 loc) · 1.11 KB
/
YamlTimeline.cs
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
namespace TimelineGenerator
{
internal class YamlEvent
{
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public DateTime Start { get; set; }
public DateTime? End { get; set; }
public List<string> Tags { get; set; } = new List<string>();
public string Category { get; set; } = string.Empty;
public string Location { get; set; } = string.Empty;
public string Image { get; set; } = string.Empty;
public string Link { get; set; } = string.Empty;
public string Color { get; set; } = string.Empty;
public string Icon { get; set; } = string.Empty;
public string DateRange => End.HasValue ? $"{Start:yyyy-MM-dd} - {End:yyyy-MM-dd}" : $"{Start:yyyy-MM-dd}";
}
internal class YamlTimeline
{
public string Version { get; set; } = "1.0";
public string Title { get; set; } = "Timeline";
public string Description { get; set; } = string.Empty;
public List<YamlEvent> Events { get; set; } = new List<YamlEvent>();
}
}