mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 06:22:43 +00:00
core: badge codes schema, plan (#7427)
This commit is contained in:
1 parent
7d54a5b960
commit
e80a174f13
11 files changed
+364
-20
No files matched your search
@@ -62,6 +62,10 @@ data BadgeServiceCommand
|
||||
paymentVia :: ServicePaymentMethod,
|
||||
upgrade :: Maybe BadgeUpgrade -- upgrade non-store badge
|
||||
}
|
||||
| BSCRedeemBadgeCode
|
||||
{ masterKey :: BadgeMasterKey,
|
||||
code :: Text -- no badgeRequest: a code carries no tier for the client to state
|
||||
}
|
||||
| BSCPurchaseBadge
|
||||
{ badgeRequest :: BadgeRequest,
|
||||
payment :: ServicePayment,
|
||||
|
||||
@@ -9,6 +9,7 @@ module Simplex.Chat.Badges.Types
|
||||
BadgeItemStatus (..),
|
||||
OfferDiscount (..),
|
||||
BadgePurchaseStatus (..),
|
||||
BadgeCodePaymentStatus (..),
|
||||
LedgerEntryType (..),
|
||||
LedgerCreditType (..),
|
||||
LedgerDebitType (..),
|
||||
@@ -22,7 +23,6 @@ module Simplex.Chat.Badges.Types
|
||||
) where
|
||||
|
||||
import qualified Data.Aeson as J
|
||||
import Data.ByteString.Char8 (ByteString)
|
||||
import Data.Int (Int64)
|
||||
import Data.Text (Text)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
@@ -58,6 +58,10 @@ data OfferDiscount
|
||||
data BadgePurchaseStatus = PSAcquiring | PSIssued | PSSuperseded | PSFailed
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- unconfirmed draft
|
||||
data BadgeCodePaymentStatus = CPSPaid | CPSUnpaid | CPSFree
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- confirmed
|
||||
data LedgerEntryType = LECredit {credit :: LedgerCreditType} | LEDebit {debit :: LedgerDebitType}
|
||||
deriving (Eq, Show)
|
||||
|
||||
Reference in new issue
Block a user