(company_pk, deleted_at) for the forward pass and (media_pk) for the reverse pass.
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 via MikroORM onCreate hook (new Date()); not writable by callers
- deleted_at β written by soft-delete mutations (useAddCompanyMedia / useDeleteCompanyMedia service layer); never set by the user directly via PATCH
- pk β internal auto-increment integer primary key; never exposed in the public API. No public UUID (*_id) column exists on this entity β the entity is identified in the API by its relationship context (company_id + media_id pair), not by a standalone resource id
- Indexes maintained by migrations: idx_company_media_company_deleted (company_pk, deleted_at) β hot-path for Hasura forward traversal; idx_company_media_media (media_pk) β hot-path for Hasura reverse traversal. Both created in Migration20260416000000_hasura_and_service_hot_path_indexes_round4.
Example
apps/api/src/database/entities/CompanyMedia.ts Β· domain: financial-graph Β· tier: Supporting