diff --git a/mateamt.cabal b/mateamt.cabal index 67d971e..87ce21c 100644 --- a/mateamt.cabal +++ b/mateamt.cabal @@ -28,6 +28,7 @@ executable mateamt , Model.Product , Model.Auth , Model.Amount + , Model.Journal , Types , Types.Auth , Types.Product @@ -36,6 +37,7 @@ executable mateamt , Types.User , Types.Purchase , Types.Amount + , Types.Journal -- other-extensions: build-depends: base ^>=4.12.0.0 , servant diff --git a/src/Main.hs b/src/Main.hs index bb0af17..de8f784 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -49,6 +49,7 @@ main = do execute_ conn initProduct execute_ conn initToken execute_ conn initAmount + execute_ conn initJournal withStdoutLogger $ \log -> do let settings = setPort 3000 $ setLogger log defaultSettings initState = ReadState diff --git a/src/Model.hs b/src/Model.hs index 76657b9..7db6fbb 100644 --- a/src/Model.hs +++ b/src/Model.hs @@ -6,3 +6,4 @@ import Model.User as M import Model.Product as M import Model.Auth as M import Model.Amount as M +import Model.Journal as M diff --git a/src/Types.hs b/src/Types.hs index 3d738d1..d893910 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -9,3 +9,4 @@ import Types.Reader as T import Types.User as T import Types.Purchase as T import Types.Amount as T +import Types.Journal as T diff --git a/src/Types/Journal.hs b/src/Types/Journal.hs index 08d040e..2abbb9e 100644 --- a/src/Types/Journal.hs +++ b/src/Types/Journal.hs @@ -8,10 +8,11 @@ import qualified Data.Text as T (Text) import Data.Aeson -import Data.Time.Clock (UTCTime) +import Data.Time (UTCTime) data JournalEntry = JournalEntry - { journalEntryDescription :: T.Text + { journalEntryId :: Int + , journalEntryDescription :: T.Text , journalEntryTimestamp :: UTCTime , journalEntryAmount :: Int , journalEntryTotalAmount :: Int