Database Schema
15 models · 16 relations
Core
CRM
B2B Shop
Lookup
B2C
Catalog
1-to-many optional FKHover a model to highlight its edges
UserCore
20Internal CRM users
PKid
cuid
··email
UQString
··name
String
··role
EUserRole
··createdAt
DateTime
←Account←Lead←Activity←B2cOrder
AccountCore
514B2B customers (companies)
PKid
cuid
··name
String
··country
String
FKkamId
String?
··relationStatus
ERelationStatus
··debtorTpaStatus
ETpaStatus
··soldYtdUsd
Float?
··overdueDays
Int?
··sanctions
Boolean
→User→Contact→B2bUser→B2bEvent→Lead+4
ContactCRM
0People at accounts
PKid
cuid
FKaccountId
String
··firstName
String
··lastName
String
··jobTitle
String?
··isKdm
Boolean
←Account
B2bUserB2B Shop
0B2B shop logins
PKid
cuid
FKaccountId
String
··email
String
··lastLogin
DateTime?
··loginsInPeriod
Int
··ordersCreated
Int
←Account
B2bEventB2B Shop
0Intent signals from shop
PKid
cuid
FKaccountId
String
··type
EB2bEventType
··productSku
String?
··category
String?
··occurredAt
DateTime
←Account
LeadCRM
0B2B sales opportunities
PKid
cuid
FKaccountId
String
··name
String
··status
ELeadStatus
··level
ELeadLevel
··budgetUsd
Float?
FKresponsibleId
String?
←Account→Activity→User
ActivityCRM
0Timeline: calls, meetings…
PKid
cuid
FKaccountId
String
FKleadId
String?
FKauthorId
String?
··type
EActivityType
··subject
String
··nextAction
String?
←Account←Lead→User
PeriodSalesCRM
514Quarterly revenue cache
PKid
cuid
FKaccountId
String
··year
Int
··quarter
Int
··soldUsd
Float
··gmPct
Float
←Account
BrandLookup
1Product brands
PKid
cuid
··name
UQString
→AccountBrand
AccountBrandLookup
514Account ↔ Brand junction
PKaccountId
String
PKbrandId
String
··toSell
Boolean
←Account←Brand
TargetGroupLookup
0Customer segments
PKid
cuid
··name
UQString
··isAuto
Boolean
→AccountTargetGroup
AccountTargetGroupLookup
0Account ↔ Segment junction
PKaccountId
String
PKtargetGroupId
String
←Account←TargetGroup
ConsumerB2C
30B2C end customers
PKid
cuid
··firstName
String
··lastName
String
··phone
String?
··country
String
→B2cOrder
B2cOrderB2C
45B2C sales orders
PKid
cuid
FKconsumerId
String
··stage
EB2cStage
··productName
String?
··budgetUsd
Float?
FKmanagerId
String?
··paymentPaid
Boolean
←Consumer→User
ProductCatalog
593Product catalog
PKid
cuid
··sku
UQString
··name
String
··brand
String
··category
String
··priceUsd
Float?