app.expense_receipts
TableRow level security on
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.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| 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.References app.organizations.id |
| expense_id | uuid | No | The expense the receipt belongs to.References 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 | Yes | When the photo was taken, by the device clock; null when unknown. |
| ai_suggestion_id | uuid | Yes | The Aurora receipt extraction whose proposed fields the person confirmed, or null when they typed every field.References app.ai_suggestions.id |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |