DownloadLog.tenantId records which organization downloaded a stored document, taken from the X-Organization-Id header on the download call. Because the download handler resolves the StoredDocument scoped to that tenant before logging, a row only ever exists for a tenant downloading its own document. The model indexes (tenantId, createdAt), so producing a tenant's download history in chronological order — for an audit or usage report — is efficient.
Skarn PDF
DownloadLog.tenantId
The tenant that performed a document download.
