Data model

"accounts"."ACCOUNT_HOLDER" {
  shape: sql_table
    link: "../internals/models/#components.payment_gateway.subcomponents.accounts.models.account_holder.AccountHolder"

"id": UUID {constraint: primary_key}
  "description": TEXT 
  "external_id": VARCHAR(255) 
  "provider": VARCHAR(255) 
  "reference": TEXT 
  "terminated_at": DATETIME 
}
"accounts"."ACCOUNT" {
  shape: sql_table
    link: "../internals/models/#components.payment_gateway.subcomponents.accounts.models.account.Account"

"id": UUID {constraint: primary_key}
  "account_holder_id": UUID 
  "description": TEXT 
  "external_id": VARCHAR(255) 
  "provider": VARCHAR(255) 
  "reference": TEXT 
  "terminated_at": DATETIME 
}
"accounts"."ACCOUNT_STATUS_LOG" {
  shape: sql_table
    link: "../internals/models/#components.payment_gateway.subcomponents.accounts.models.account.AccountStatusLog"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "status": VARCHAR(255) 
}
"cards"."CARD" {
  shape: sql_table
    link: "../../cards/internals/models/#components.payment_gateway.subcomponents.cards.models.card.Card"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "card_holder_id": UUID 
  "description": TEXT 
  "display_name": TEXT 
  "expiration_date": DATE 
  "external_id": VARCHAR(255) 
  "is_virtual": BOOLEAN 
  "issuance_reason": TEXT 
  "issued_at": DATETIME 
  "last_four_digits": VARCHAR(4) 
  "provider": VARCHAR(255) 
  "reference": TEXT 
  "terminated_at": DATETIME 
}
"transfers"."ACCOUNT_TRANSFER" {
  shape: sql_table
    link: "../../transfers/internals/models/#components.payment_gateway.subcomponents.transfers.models.account_transfer.AccountTransfer"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "direction": VARCHAR(255) 
  "effective_date": DATETIME 
  "external_id": VARCHAR(255) 
  "provider": VARCHAR(255) 
  "raw": JSONB 
  "reference": VARCHAR(255) 
  "transfer_history_id": UUID 
}
"accounts"."SEPA_BENEFICIARY" {
  shape: sql_table
    link: "../internals/models/#components.payment_gateway.subcomponents.accounts.models.sepa_beneficiary.SepaBeneficiary"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "external_id": VARCHAR(255) 
  "iban": VARCHAR(34) 
  "issued_at": DATETIME 
  "name": VARCHAR(255) 
  "provider": VARCHAR(255) 
}
"accounts"."SEPA_BENEFICIARY_STATUS_LOG" {
  shape: sql_table
    link: "../internals/models/#components.payment_gateway.subcomponents.accounts.models.sepa_beneficiary.SepaBeneficiaryStatusLog"

"id": UUID {constraint: primary_key}
  "sepa_beneficiary_id": UUID 
  "status": VARCHAR(255) 
}
"banking_documents"."SEPA_MANDATE" {
  shape: sql_table
    link: "../../banking_documents/internals/models/#components.payment_gateway.subcomponents.banking_documents.models.sepa_mandate.SepaMandate"

"id": UUID {constraint: primary_key}
  "account_holder_id": UUID 
  "debtor_country": VARCHAR(3) 
  "debtor_iban": VARCHAR(34) 
  "debtor_name": VARCHAR(255) 
  "external_id": VARCHAR(255) 
  "issued_at": DATETIME 
  "provider": VARCHAR(255) 
  "sepa_creditor_identifier": VARCHAR(255) 
  "unique_mandate_reference": VARCHAR(255) 
}
"transfers"."BANK_TRANSFER" {
  shape: sql_table
    link: "../../transfers/internals/models/#components.payment_gateway.subcomponents.transfers.models.bank_transfer.BankTransfer"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "direction": VARCHAR(255) 
  "effective_date": DATETIME 
  "external_id": VARCHAR(255) 
  "provider": VARCHAR(255) 
  "raw": JSONB 
  "sepa_beneficiary_id": UUID 
  "sepa_mandate_id": UUID 
  "transfer_history_id": UUID 
}
"transfers"."CARD_PAYMENT" {
  shape: sql_table
    link: "../../transfers/internals/models/#components.payment_gateway.subcomponents.transfers.models.card_transfer.CardTransfer"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "card_id": UUID 
  "city": VARCHAR(255) 
  "country": VARCHAR(255) 
  "effective_date": DATETIME 
  "external_id": VARCHAR(255) 
  "mcc": VARCHAR(10) 
  "merchant_id": VARCHAR(255) 
  "name": VARCHAR(255) 
  "postal_code": VARCHAR(255) 
  "provider": VARCHAR(255) 
  "raw": JSONB 
  "transfer_history_id": UUID 
}
"rules"."USAGE_RESTRICTION_RULE" {
  shape: sql_table
    link: "../../rules/internals/models/#components.payment_gateway.subcomponents.rules.models.usage_restriction_rule.UsageRestrictionRule"

"id": UUID {constraint: primary_key}
  "account_id": UUID 
  "criteria": JSONB 
  "description": TEXT 
  "end": DATETIME 
  "external_id": VARCHAR(255) 
  "is_active": BOOLEAN 
  "reference": TEXT 
  "start": DATETIME 
  "terminated_at": DATETIME 
}
"accounts"."ACCOUNT_HOLDER"."id" -> "accounts"."ACCOUNT"."account_holder_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "accounts"."ACCOUNT_STATUS_LOG"."account_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "cards"."CARD"."account_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "transfers"."ACCOUNT_TRANSFER"."account_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "accounts"."SEPA_BENEFICIARY"."account_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."SEPA_BENEFICIARY"."id" -> "accounts"."SEPA_BENEFICIARY_STATUS_LOG"."sepa_beneficiary_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT_HOLDER"."id" -> "banking_documents"."SEPA_MANDATE"."account_holder_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "transfers"."BANK_TRANSFER"."account_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"banking_documents"."SEPA_MANDATE"."id" -> "transfers"."BANK_TRANSFER"."sepa_mandate_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."SEPA_BENEFICIARY"."id" -> "transfers"."BANK_TRANSFER"."sepa_beneficiary_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"cards"."CARD"."id" -> "transfers"."CARD_PAYMENT"."card_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "transfers"."CARD_PAYMENT"."account_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"accounts"."ACCOUNT"."id" -> "rules"."USAGE_RESTRICTION_RULE"."account_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
Hold "Alt" / "Option" to enable pan & zoom