aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Model/Init.hs
blob: 68b3f5dfdc78b28157a24980b241e7562ff14fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Common.Model.Init
  ( Init(..)
  ) where

import           Data.Aeson                   (FromJSON, ToJSON)
import           GHC.Generics                 (Generic)

import           Common.Model.Category        (Category)
import           Common.Model.Currency        (Currency)
import           Common.Model.Income          (Income)
import           Common.Model.Payment         (Payment)
import           Common.Model.PaymentCategory (PaymentCategory)
import           Common.Model.User            (User, UserId)

data Init = Init
  { _init_users             :: [User]
  , _init_currentUser       :: UserId
  , _init_payments          :: [Payment]
  , _init_incomes           :: [Income]
  , _init_categories        :: [Category]
  , _init_paymentCategories :: [PaymentCategory]
  , _init_currency          :: Currency
  } deriving (Show, Generic)

instance FromJSON Init
instance ToJSON Init