|
|
|
@ -5,6 +5,8 @@ module Types.Refine where |
|
|
|
|
|
|
|
|
|
import GHC.Generics |
|
|
|
|
|
|
|
|
|
import Data.OpenApi (ToParamSchema(..)) |
|
|
|
|
|
|
|
|
|
import Web.HttpApiData |
|
|
|
|
|
|
|
|
|
data UserRefine = AllUsers | ActiveUsers | OldUsers |
|
|
|
@ -24,6 +26,7 @@ instance ToHttpApiData UserRefine where |
|
|
|
|
ActiveUsers -> "active" |
|
|
|
|
OldUsers -> "old" |
|
|
|
|
|
|
|
|
|
instance ToParamSchema UserRefine |
|
|
|
|
|
|
|
|
|
data ProductRefine = AllProducts | AvailableProducts | DepletedProducts |
|
|
|
|
deriving (Generic, Show, Enum) |
|
|
|
@ -41,3 +44,5 @@ instance ToHttpApiData ProductRefine where |
|
|
|
|
AllProducts -> "all" |
|
|
|
|
AvailableProducts -> "available" |
|
|
|
|
DepletedProducts -> "depleted" |
|
|
|
|
|
|
|
|
|
instance ToParamSchema ProductRefine |
|
|
|
|