3U

Data Model

Conceptual data models for the ThreeU platform.

Developer

The Developer entity represents a registered third-party developer. Key traits:

  • Authenticatable (login, tokens, sessions)
  • HasApiTokens (developer API tokens for CI/CD)
  • HasWallet (QAR wallet for earnings)
  • Owns Plugin records through owner morph

Plugin

FieldTypeDescription
idintegerUnique identifier
slugstringURL-safe identifier
name / name_arstringDisplay name (EN/AR)
categorystringPlugin category
surface_typestring"plugin" or "page"
trigger_modestring"manual" or "automatic"
ownershipstring"official", "community", "custom"
versionstringCurrent version
config_schemajsonMerchant settings form
manifestjsonRuntime contract
webhook_eventsjsonSubscribed events
provider_classstringInternal provider class

Brand Plugin Install

FieldTypeDescription
brand_idintegerInstalling brand
plugin_idintegerInstalled plugin
statusstringInstallation status
configjson (encrypted)Merchant's values
credentialsjson (encrypted)Merchant's secrets
enabled_actionsjsonEnabled actions
permissionsjsonApproved permissions
webhook_secretstringPer-install secret

AccountContract

Contracts define commercial relationships:

  • Developer can be initiator or counterparty
  • Partner, Brand, or ThreeU as counterparty
  • Status: proposedacceptedactiveterminated / declined

Wallet

QAR-denominated developer wallet:

  • Balance tracking (available, pending, total)
  • Payout requests and processing
  • Transaction history
  • Contract-linked revenue