|
2 | 2 |
|
3 | 3 | namespace JournalApp; |
4 | 4 |
|
| 5 | +/// <summary> |
| 6 | +/// Represents a single data point recorded in the journal. |
| 7 | +/// </summary> |
5 | 8 | public class DataPoint |
6 | 9 | { |
| 10 | + /// <summary> |
| 11 | + /// The unique identifier for the data point. |
| 12 | + /// </summary> |
7 | 13 | [Key] |
8 | 14 | public Guid Guid { get; set; } |
9 | 15 |
|
| 16 | + /// <summary> |
| 17 | + /// The day to which the data point belongs. |
| 18 | + /// </summary> |
10 | 19 | [JsonIgnore] |
11 | 20 | public virtual Day Day { get; set; } |
12 | 21 |
|
| 22 | + /// <summary> |
| 23 | + /// The category of the data point. |
| 24 | + /// </summary> |
13 | 25 | [JsonIgnore] |
14 | 26 | public virtual DataPointCategory Category { get; set; } |
15 | 27 |
|
| 28 | + /// <summary> |
| 29 | + /// The creation timestamp of the data point. |
| 30 | + /// </summary> |
16 | 31 | public DateTimeOffset CreatedAt { get; set; } |
17 | 32 |
|
| 33 | + /// <summary> |
| 34 | + /// The type of the data point. |
| 35 | + /// </summary> |
18 | 36 | public PointType Type { get; set; } |
19 | 37 |
|
| 38 | + /// <summary> |
| 39 | + /// Indicates whether the data point is deleted. |
| 40 | + /// </summary> |
20 | 41 | public bool Deleted { get; set; } |
21 | 42 |
|
| 43 | + /// <summary> |
| 44 | + /// The mood value of the data point, if applicable. |
| 45 | + /// </summary> |
22 | 46 | public string Mood { get; set; } |
| 47 | + |
| 48 | + /// <summary> |
| 49 | + /// The sleep hours value of the data point, if applicable. |
| 50 | + /// </summary> |
23 | 51 | public decimal? SleepHours { get; set; } |
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// The scale index value of the data point, if applicable. |
| 55 | + /// </summary> |
24 | 56 | public int? ScaleIndex { get; set; } |
| 57 | + |
| 58 | + /// <summary> |
| 59 | + /// The boolean value of the data point, if applicable. |
| 60 | + /// </summary> |
25 | 61 | public bool? Bool { get; set; } |
| 62 | + |
| 63 | + /// <summary> |
| 64 | + /// The numeric value of the data point, if applicable. |
| 65 | + /// </summary> |
26 | 66 | public double? Number { get; set; } |
| 67 | + |
| 68 | + /// <summary> |
| 69 | + /// The text value of the data point, if applicable. |
| 70 | + /// </summary> |
27 | 71 | public string Text { get; set; } |
| 72 | + |
| 73 | + /// <summary> |
| 74 | + /// The medication dose value of the data point, if applicable. |
| 75 | + /// </summary> |
28 | 76 | public decimal? MedicationDose { get; set; } |
29 | 77 |
|
| 78 | + /// <summary> |
| 79 | + /// Indicates whether the data point is a timestamped note. |
| 80 | + /// </summary> |
30 | 81 | [JsonIgnore] |
31 | 82 | public bool IsTimestampedNote => Category?.Group == "Notes"; |
32 | 83 |
|
| 84 | + /// <summary> |
| 85 | + /// The list of predefined moods. |
| 86 | + /// </summary> |
33 | 87 | [JsonIgnore] |
34 | 88 | public static IReadOnlyList<string> Moods { get; } = ["🤔", "🤩", "😀", "🙂", "😐", "😕", "😢", "😭"]; |
35 | 89 |
|
|
0 commit comments