Skip to main content

Brands

Represents the different brand identities operating under a parent company. Each brand can have its own configuration, players, games, and reward structures.

Relationships

Columns

ColumnTypeNullableDefaultDescription
iduuidNOgen_random_uuid()Primary key
namevarchar(255)NOBrand name. Must be unique across all brands.
is_enabledbooleanYESfalseWhether the brand is currently active and accessible
company_iduuidNOFK to companies. Parent company that owns this brand.
configjsonbYESFlexible JSON configuration for brand-specific settings (e.g., feature flags, UI config, payment settings)
origintext[]YES'{}'Array of allowed origin domains for CORS and request validation
is_archivedbooleanNOfalseSoft-delete flag. Archived brands are hidden from active listings.
is_sweepstakesbooleanNOfalseWhether this brand operates as a sweepstakes casino (affects currency types, legal compliance, and game availability)
created_attimestampYESCURRENT_TIMESTAMPRecord creation timestamp
updated_attimestampYESCURRENT_TIMESTAMPLast update timestamp

Key Indexes

IndexColumnsNotes
brands_pkeyidPrimary key
brands_name_keynameUnique constraint
idx_brands_is_sweepstakesis_sweepstakesFilter by sweepstakes mode
idx_brands_originoriginGIN index for array search

Business Rules

  • Brand names must be globally unique
  • The is_sweepstakes flag determines the entire currency model:
    • Sweepstakes brands: Use Gold Coins (GC) and Sweepstakes Coins (SC) with no real-money deposits/withdrawals
    • Regular brands: Use real-money currencies (EUR, USD, etc.)
  • The config JSONB field stores brand-specific overrides like payment provider settings, UI themes, and feature toggles
  • The origin array is used for validating API requests from allowed frontend domains
  • Brands cannot be hard-deleted; they are archived via is_archived