{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric      #-}

module Data.Track.Log where

import           Control.DeepSeq
import           Control.Lens
import           Data.Aeson
import           Data.Data
import           Data.Text
import           Data.Time
import           Data.Track.Rules
import           GHC.Generics

data Entry
    = Entry
        { entryTimestamp :: UTCTime
        , entryAbout     :: Text
        , entryMessage   :: Text
        }
    deriving (Eq, Show, Read, Data, Typeable, Generic)

instance NFData Entry
instance ToJSON Entry where toJSON = trackToJSON
instance FromJSON Entry where parseJSON = trackParseJSON
