event_cards


Description

{“what”:“A card instance tied to a profile, created from a template and matched signals.”,“why”:“Without it, the system cannot track which cards were generated for a profile and when.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.263567167+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 √ nextval('event_cards_id_seq'::regclass)
card_contacts.event_card_id card_contacts_event_card_id_fkey R
commentary.event_card_id commentary_event_card_id_fkey R

{“what”:“Unique integer identifier for the card, auto-incremented.”,“why”:“Without it, rows cannot be referenced uniquely for updates or joins.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.280912704+00:00”}

profile_id int4 10 null
profiles.id event_cards_profile_id_fkey R

{“what”:“ID of the profile this card belongs to.”,“why”:“Without it, cards cannot be scoped to a specific user profile.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.303422454+00:00”}

template_slug text 2147483647 null
event_card_templates.slug event_cards_template_slug_fkey R

{“what”:“Slug of the template that generated this card, e.g. ‘risk-alert’.”,“why”:“Without it, the card’s layout and content rules are unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.317492306+00:00”}

matched_signal_ids text 2147483647 null

{“what”:“Serialized list of signal IDs that triggered this card, e.g. ‘12,34’.”,“why”:“Without it, the system cannot know which signals contributed to the card.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.333339241+00:00”}

signal_count int4 10 null

{“what”:“Count of matched signals for this card.”,“why”:“Without it, the card cannot display a summary or be filtered by signal volume.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.351133526+00:00”}

confidence float4 8,8 √ null

{“what”:“Confidence score between 0 and 1 for the card’s relevance.”,“why”:“Without it, the system cannot rank or prioritize cards by certainty.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.385547643+00:00”}

narrative_override text 2147483647 √ null

{“what”:“Optional custom narrative text replacing the template’s default.”,“why”:“Without it, any manual edits to the card’s message are lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.421243788+00:00”}

matched_at timestamptz 35,6 √ now()

{“what”:“Timestamp when the card was generated, defaulting to current time.”,“why”:“Without it, the card’s creation time is unknown, affecting ordering and expiry.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.449581036+00:00”}

expires_at timestamptz 35,6 √ null

{“what”:“Timestamp after which the card is no longer valid, if set.”,“why”:“Without it, the card’s validity period is unknown, and stale cards may be shown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:15:59.554329078+00:00”}

Indexes

Constraint Name Type Sort Column(s)
event_cards_pkey Primary key Asc id
idx_ec_confidence Performance Desc confidence
idx_ec_profile Performance Asc profile_id
idx_ec_template Performance Asc template_slug

Check Constraints

Constraint Name Constraint
event_cards_confidence_check ((confidence >= (0)::double precision) AND (confidence <= (100)::double precision))

Relationships