add relation to document_type model
improve document download
improve document download