app.expense_receipts
TablaSeguridad a nivel de fila activa
The receipt photo of an expense, filed from Compass with the expense (Section 4.3 item 11). Written only by app.submit_expense_receipt; readable by whoever can read the expense.
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.expenses on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| expense_id | uuid | No | The expense the receipt belongs to.Hace referencia a app.expenses.id |
| media_uri | text | No | Object name of the photo in the field-media bucket: <org_id>/expense-receipts/<project_id>/<file name>, the project of the expense's budget line. |
| capture_source | text | No | How the photo was taken: Camera (Compass's camera) or Photo Library (one photo picked in the system picker). |
| captured_at | timestamp with time zone | Sí | When the photo was taken, by the device clock; null when unknown. |
| ai_suggestion_id | uuid | Sí | The Aurora receipt extraction whose proposed fields the person confirmed, or null when they typed every field.Hace referencia a app.ai_suggestions.id |
| 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. |