blob: db1da53c41a0b42ad2f8bc0b40f98d094a7f7fc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
module Common.Model.Category
( CategoryId
, Category(..)
) where
import Data.Aeson (FromJSON, ToJSON)
import Data.Int (Int64)
import Data.Text (Text)
import Data.Time (UTCTime)
import GHC.Generics (Generic)
type CategoryId = Int64
data Category = Category
{ _category_id :: CategoryId
, _category_name :: Text
, _category_color :: Text
, _category_createdAt :: UTCTime
, _category_editedAt :: Maybe UTCTime
, _category_deletedAt :: Maybe UTCTime
} deriving (Show, Generic)
instance FromJSON Category
instance ToJSON Category
|