summaryrefslogtreecommitdiff
path: root/haskell/src/SpaceTraders/Model/Inventory.hs
blob: 4faea5273f496b0b90a3e7c24540af4fe7524af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric  #-}

module SpaceTraders.Model.Inventory
  ( Inventory(..)
  ) where

import           Data.Aeson
import qualified Data.Text    as T
import           GHC.Generics

data Inventory = Inventory { description :: T.Text
                           , name        :: T.Text
                           , symbol      :: T.Text
                           , units       :: Int
                           } deriving (FromJSON, Generic, Show, ToJSON)