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.Product
, Model.Auth , Model.Auth
, Model.Amount , Model.Amount
, Model.Journal
, Types , Types
, Types.Auth , Types.Auth
, Types.Product , Types.Product
@ -36,6 +37,7 @@ executable mateamt
, Types.User , Types.User
, Types.Purchase , Types.Purchase
, Types.Amount , Types.Amount
, Types.Journal
-- other-extensions: -- other-extensions:
build-depends: base ^>=4.12.0.0 build-depends: base ^>=4.12.0.0
, servant , servant

View file

@ -49,6 +49,7 @@ main = do
execute_ conn initProduct execute_ conn initProduct
execute_ conn initToken execute_ conn initToken
execute_ conn initAmount execute_ conn initAmount
execute_ conn initJournal
withStdoutLogger $ \log -> do withStdoutLogger $ \log -> do
let settings = setPort 3000 $ setLogger log defaultSettings let settings = setPort 3000 $ setLogger log defaultSettings
initState = ReadState initState = ReadState

View file

@ -6,3 +6,4 @@ import Model.User as M
import Model.Product as M import Model.Product as M
import Model.Auth as M import Model.Auth as M
import Model.Amount 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.User as T
import Types.Purchase as T import Types.Purchase as T
import Types.Amount 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.Aeson
import Data.Time.Clock (UTCTime) import Data.Time (UTCTime)
data JournalEntry = JournalEntry data JournalEntry = JournalEntry
{ journalEntryDescription :: T.Text { journalEntryId :: Int
, journalEntryDescription :: T.Text
, journalEntryTimestamp :: UTCTime , journalEntryTimestamp :: UTCTime
, journalEntryAmount :: Int , journalEntryAmount :: Int
, journalEntryTotalAmount :: Int , journalEntryTotalAmount :: Int