diff --git a/src/Types/Settings.hs b/src/Types/Settings.hs index d31d8e8..198fe53 100644 --- a/src/Types/Settings.hs +++ b/src/Types/Settings.hs @@ -1,21 +1,26 @@ {-# LANGUAGE TypeFamilies #-} module Types.Settings where +import qualified Data.Text as T + +-- internal imports + import Classes data Settings = Settings { settingsBlockRegistration :: Bool + , settingsImprintText :: T.Text } deriving (Show) instance ToDatabase Settings where - type InTuple Settings = Bool + type InTuple Settings = (Bool, T.Text) - toDatabase (Settings reg) = reg + toDatabase (Settings reg imprint) = (reg, imprint) instance FromDatabase Settings where - type OutTuple Settings = Bool + type OutTuple Settings = (Bool, T.Text) - fromDatabase reg = Settings reg + fromDatabase (reg, imprint) = Settings reg imprint