app.journal_entries
TablaSeguridad a nivel de fila activa
Journal entries. Prepared, then posted by someone other than the preparer (Section 8.2); posting into a Closed, Audited or Archived period is refused (invariant 13). Entries generated by approved documents are prepared by the platform.
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.accounting_periods on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| accounting_period_id | uuid | No | Period the entry posts to; its dates cover entry_date.Hace referencia a app.accounting_periods.id |
| project_id | uuid | Sí | Project the entry belongs to, when it does.Hace referencia a app.projects.id |
| entry_date | date | No | Date the cost or revenue is recognized. |
| memo | text | No | What the entry records. |
| journal_state | app.journal_state | No | Proposed, Posted or Canceled. Changes only through app.post_journal_entry and app.cancel_journal_entry. |
| prepared_by | uuid | Sí | Person who prepared the entry, set from the session; NULL when the platform generated it from an approved document.Hace referencia a app.people.id |
| posted_by | uuid | Sí | Person who posted the entry; never the preparer.Hace referencia a app.people.id |
| posted_at | timestamp with time zone | Sí | When the entry was posted. |
| source_table | text | Sí | Table of the document that generated the entry, such as expenses. |
| source_id | uuid | Sí | Id of the document that generated the entry. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |