aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/EditCategory.hs
blob: bda3418af743f19a40719003f6feeeb65aad70dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE DeriveGeneric #-}

module Model.Json.EditCategory
  ( EditCategory(..)
  ) where

import GHC.Generics

import Data.Aeson
import Data.Text (Text)

import Model.Database (CategoryId)

data EditCategory = EditCategory
  { id :: CategoryId
  , name :: Text
  , color :: Text
  } deriving (Show, Generic)

instance FromJSON EditCategory