CompanyCreditChangeLogs


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 √ nextval('employer_purchases."CompanyCreditChangeLogs_id_seq"'::regclass)
uuid uuid 2147483647 gen_random_uuid()

A UUID that uniquely identifies this log entry. Unlike the numeric id, it can be safely exposed in API responses.

companyId uuid 2147483647 null
Companies.id CompanyCreditChangeLogs_companyId_fkey R
totalBalance int8 19 null
changeType "employer_purchases"."enum_CompanyCreditChangeLogs_changeType" 2147483647 null
amount int8 19 null
reason "employer_purchases"."enum_CompanyCreditChangeLogs_reason" 2147483647 null
referenceId varchar 64 null

A flexible reference identifier, such as an order number or a primary key from another table. Used to simplify lookups and tracing without carrying formal relational constraints.

context jsonb 2147483647 null
createdAt timestamptz 35,6 now()
updatedAt timestamptz 35,6 now()

Indexes

Constraint Name Type Sort Column(s)
CompanyCreditChangeLogs_pkey Primary key Asc id
CompanyCreditChangeLogs_changeType_idx Performance Asc changeType
CompanyCreditChangeLogs_companyId_changeType_reason_referenceId Must be unique Asc/Asc/Asc/Asc companyId + changeType + reason + referenceId
CompanyCreditChangeLogs_companyId_idx Performance Asc companyId
CompanyCreditChangeLogs_createdAt_idx Performance Asc createdAt
CompanyCreditChangeLogs_reason_idx Performance Asc reason
CompanyCreditChangeLogs_referenceId_idx Performance Asc referenceId
CompanyCreditChangeLogs_uuid_key Must be unique Asc uuid

Relationships