mateamt/src/Types/Beverage.hs
2019-04-17 16:14:44 +02:00

28 lines
735 B
Haskell

{-# LANGUAGE DeriveGeneric #-}
module Types.Beverage where
import GHC.Generics
import Data.Aeson
import qualified Data.Text as T
data Beverage = Beverage
{ beverageIdent :: T.Text
, beveragePrice :: Int
, beverageAmount :: Int
, beverageVanish :: Int
, beverageMl :: Int
, beverageAvatar :: Maybe Word
, beverageSupplier :: Maybe Word
, beverageMaxAmount :: Int
, beverageTotalBought :: Int
, beverageAmonutPerCrate :: Int
, beveragePricePerCrate :: Maybe Int
, beverageArtNr :: Maybe T.Text
} deriving (Generic, Show)
instance ToJSON Beverage where
toEncoding = genericToEncoding defaultOptions
instance FromJSON Beverage