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
- workspace_posting_mapping_id — generated via gen_random_uuid() on insert, exposed as the public API id
- created_at — set automatically by the MikroORM onCreate hook; never writable after creation
- updated_at — set automatically by the MikroORM onUpdate hook on every write
- deleted_at — soft-delete field written by the posting engine on rule retirement; not writable by users
- mapping_status — managed exclusively by the posting engine (transitions: active → needs_review → inactive or active → deleted_at); default ‘active’ on creation
- mapping_version — incremented by the posting engine on each rule revision; default 1
- created_by — set at creation time by the engine to record provenance (‘deterministic’, ‘reviewed_llm’) or set to ‘manual’ for human-authored rules; not subsequently editable
- confidence — computed and stamped by the LLM jury or deterministic scoring logic; null for fully-deterministic rules
- evidence — populated by the engine with the reasoning payload from the mapping generation run
- sourceWorkspaceConnector provenance — when set, records which connector sync triggered the mapping creation; ON DELETE SET NULL ensures orphan safety on connector removal
- Partial unique index workspace_posting_mappings_active_context_unique (WHERE deleted_at IS NULL AND mapping_status = ‘active’) — enforced at the DB layer only; cannot be expressed via MikroORM decorators (COALESCE expressions + partial predicate). The entity comment documents this divergence from schema:fresh.
Example
apps/api/src/database/entities/WorkspacePostingMapping.ts · domain: financial-graph · tier: Infrastructure