module Common.Model.CategoryPage
  ( CategoryPage(..)
  ) where

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

import           Common.Model.Category (Category, CategoryId)

data CategoryPage = CategoryPage
  { _categoryPage_page           :: Int
  , _categoryPage_categories     :: [Category]
  , _categoryPage_usedCategories :: [CategoryId]
  , _categoryPage_totalCount     :: Int
  } deriving (Eq, Show, Generic)

instance FromJSON CategoryPage
instance ToJSON CategoryPage