{-# LANGUAGE DeriveGeneric #-}

module Model.Json.MessagePart
  ( MessagePart(..)
  ) where

import Data.Text (Text)

import Data.Aeson
import GHC.Generics

data MessagePart =
  Order Int
  | Str Text
  deriving (Eq, Show, Generic)

instance FromJSON MessagePart
instance ToJSON MessagePart