progress with implementation

This commit is contained in:
nek0 2019-08-09 20:54:06 +02:00
parent 6fa47c0e1e
commit e2f2674bf1
5 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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