Skip to main content
PersonEmail is the pivot relation that links a People record to an Email address within the financial graph. It carries metadata about the association — whether the address is the person’s primary contact, whether it has been verified, and a label classifying its context (work, personal, other). A single person may have multiple PersonEmail rows; at most one may carry is_primary = true per person (enforced by a partial unique index). The entity is workspace-scoped indirectly through the People side and is written exclusively by the connector-sync and enrichment pipelines.
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

Data model

Attributes

Relationships

System-computed

  • created_at — set on insert via MikroORM onCreate hook; never updated (no updated_at column on this entity)
  • deleted_at — soft-delete; set to current timestamp by the pipeline or service that removes the association; queries must always predicate deleted_at IS NULL
  • is_primary uniqueness — enforced by partial unique index uniq_person_emails_primary_person (person_pk) WHERE deleted_at IS NULL AND is_primary IS TRUE; the pipeline is responsible for demoting any prior primary before promoting a new one
  • label default — MikroORM entity-level default PersonEmailLabelEnum.OTHER (‘other’) applied at construction; mirrored by database DEFAULT ‘other’ set in Migration20251204160141
  • is_primary / is_verify defaults — entity-level TypeScript defaults (false) mirrored by database DEFAULT false set in Migration20251204160141
  • No UUID public identifier — PersonEmail has no *_id UUID column; it is not directly addressable via the public API as a standalone resource; it is always accessed through its parent People or Email relationship

Example

Source: /Users/maximechampoux/platform/apps/api/src/database/entities/PersonEmail.ts · domain: financial-graph · tier: Supporting