This commit is contained in:
2022-12-31 08:24:24 -05:00
commit 8745ded080
24 changed files with 611 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
module Qualify.Data.Event
( Event(..)
) where
import qualified Data.List.NonEmpty as NE
import qualified Data.NonEmptyText as NET
import qualified Data.Time as Time
data Event =
Event
{ time :: Time.UTCTime
, details :: EventDetails
}
data EventDetails
= MoodEvent Mood Intensity
| ActivityEvent ActivityType
| ConsumptionEvent Substance Dose
data Mood
= Angry
| Sad
| Happy
| Neutral
data ActivityType
= Cycling Distance
| Running Distance
| Meditation DurationX
| Pushups (NE.NonEmpty WorkoutSet)
newtype Intensity = Intensity Int
newtype Duration = Minutes Int
newtype Distance = Miles Int
newtype Reps = Reps Int
newtype WorkoutSet = WorkoutSet Reps
newtype Substance = Substance NET.NonEmptyText
newtype Dose = Dose NET.NonEmptyText