2019-12-19 01:40:54 +00:00
|
|
|
{-# LANGUAGE DeriveGeneric #-}
|
|
|
|
module Types.Meta where
|
|
|
|
|
|
|
|
import qualified Data.Text as T
|
|
|
|
|
|
|
|
import Data.Aeson
|
|
|
|
|
|
|
|
import GHC.Generics
|
2022-07-17 19:28:22 +00:00
|
|
|
import Data.OpenApi (ToSchema)
|
2019-12-19 01:40:54 +00:00
|
|
|
|
|
|
|
data MetaInformation = MetaInformation
|
|
|
|
{ metaInfoVersion :: T.Text
|
|
|
|
, metaInfoCurrency :: T.Text
|
2020-08-24 16:52:17 +00:00
|
|
|
, metaInfoDecimals :: Int
|
2019-12-19 01:40:54 +00:00
|
|
|
}
|
|
|
|
deriving (Show, Generic)
|
|
|
|
|
|
|
|
instance ToJSON MetaInformation where
|
|
|
|
toEncoding = genericToEncoding defaultOptions
|
|
|
|
|
|
|
|
instance FromJSON MetaInformation
|
2022-07-17 19:28:22 +00:00
|
|
|
instance ToSchema MetaInformation
|