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

module SpaceTraders.Model.Cargo
  ( Cargo(..)
  ) where

import           Data.Aeson
import           GHC.Generics

import           SpaceTraders.Model.Inventory (Inventory)

data Cargo = Cargo { capacity  :: Int
                   , inventory :: [Inventory]
                   , units     :: Int
                   } deriving (FromJSON, Generic, Show, ToJSON)