DownloadLog.documentId is the id of the StoredDocument that was fetched, linking each download event back to its document. The download handler sets it from the resolved document's id after confirming the document belongs to the requesting tenant. The column is indexed, so counting or listing downloads for a specific document — "how many times has this PDF been retrieved" — is a fast lookup. Together with tenantId and createdAt it forms the core of the per-document audit trail.
Skarn PDF
DownloadLog.documentId
The StoredDocument that was downloaded.
