Skip to main content
A WebLink (table core_api.web_links) is an atomic contact-channel record that stores a URL together with its social/web platform classification. WebLinks are shared, reusable objects attached to both Companies and People through the company_web_links and person_web_links bridge tables, following the same pivot-entity pattern as emails and phones. The entity holds a nullable workspace FK added in Migration20260119180000 to scope enrichment-created links. It is a Supporting root in the records layer, surfaced in composite composite_web_links_list columns on company and person pages.

API operations

Data model

Attributes

Relationships

System-computed

  • social_link_id is generated by gen_random_uuid() at the database level on INSERT; the application never supplies it.
  • created_at is set by the MikroORM onCreate lifecycle hook (new Date()); never written by application code.
  • updated_at is set by both onCreate and onUpdate lifecycle hooks; it may be null on records that have never been modified.
  • deleted_at is set to a non-null timestamp on soft delete; active queries must always filter deleted_at: null. No hard-delete path exists on this entity.
  • workspace_pk (FK) was added as nullable in Migration20260119180000; records created before that migration have workspace = null. Enrichment pipelines may create web links with a workspace scope; connector-synced links may have workspace = null.
  • PlatformEnum values instagram, facebook, website, and other were added to the native PostgreSQL enum in Migration20260119180000 via ALTER TYPE … ADD VALUE IF NOT EXISTS. The original enum (twitter, linkedin, github) was created in Migration20250801141316.
  • The web_links table was created in Migration20250919154301, migrated from a legacy social_links table. The social_link_id public UUID field preserves backward-compatible identity across that rename.

Example

Source: apps/api/src/database/entities/WebLink.ts · domain: financial-graph · tier: Supporting