AI portrait ("portrait robot") of an entity: pending enrichment suggestions extracted from its sources (actions), plus the durable AI understanding of the person. One row per parent, born at the first analysis. Written only by Services\AIPortraits, never through the entity update service (no update date bump, no hook, no reindex).

Show:

ID_AIPORTRAIT

Int(11)

Portrait ID

PARENT_ID

Int(11)

Parent model id

PARENT_TYPE

Varchar(20)

Parent model type (candidate for now; resource, contact, company later)

PORTRAIT_CREATEDAT

Datetime

Creation date

PORTRAIT_DATA

JSON

Pending suggestions document: { fields: { <apiFieldName>: { items: [ ... ] } } }.

Every field is a list of items (a scalar field holds at most one item, with an empty key). Each item carries key (sha256 of the normalized element), value (API format), label, code (dictionary), excerpt, source {type, id, ownerId}, eventDate (action date, freshness), portraitDate (entry date, expiry), confidence, version (extraction recipe). An item leaves the document once decided (applied or rejected). Rejections are remembered in TAB_AIPORTRAIT_FEEDBACK, not here.

PORTRAIT_FORMAT_VERSION

Tinyint(3) unsigned

Format version of PORTRAIT_DATA (lazy upgrader). Independent from the extraction recipe.


Default: 1

PORTRAIT_PENDING

Smallint(5) unsigned

Number of pending items, recomputed from the document in the same UPDATE (never incremented). Only used to short-circuit reads when nothing is pending: the displayed count is filtered further (rights, expiry, filled).


Default: 0

PORTRAIT_SUMMARY

JSON

Durable understanding of the person: { updatedAt, version, entries: [ { topic, statement, excerpt, sources: [ {type, id, ownerId, date} ], since, supersededBy } ] }. Typed, sourced statements only, never free text; an entry whose sources all disappeared is removed; contradicted entries are kept (supersededBy). NULL until the summary feature ships.

PORTRAIT_UPDATEDAT

Datetime

Last update date

SUMMARY_UPDATEDAT

Datetime

Last rewrite of the summary

SUMMARY_VERSION

Varchar(64)

Recipe (provider + prompt + format) that produced the summary