document scraper logic and API refactor

This commit is contained in:
Mazyar
2026-05-11 15:52:32 +03:30
parent b4efb97f47
commit 7c42b343ce
4 changed files with 318 additions and 97 deletions
+7 -2
View File
@@ -11,9 +11,14 @@ type DocumentScraperGetRequest struct {
NoticeID string `param:"notice_id" valid:"required~Notice ID is required"`
}
// DocumentScraperTenderResponse represents the response for a tender returned to the document scraper service
// DocumentScraperTenderResponse represents the response for a tender returned to the document scraper service.
//
// ContractFolderID is the TED procedure identifier (BT-04 / ContractFolderID),
// included so the scraper can build the MinIO upload path for this notice:
//
// PROC_<contract_folder_id>/<notice_publication_id>/<file>
type DocumentScraperTenderResponse struct {
ID string `json:"id"`
ContractFolderID string `json:"contract_folder_id"`
NoticePublicationID string `json:"notice_publication_id"`
DocumentURL string `json:"document_url"`
Title string `json:"title"`
+1 -1
View File
@@ -41,7 +41,7 @@ func (s *service) buildTenderResponse(_ context.Context, t *tender.Tender) *Docu
}
return &DocumentScraperTenderResponse{
ID: t.ID.Hex(),
ContractFolderID: t.ContractFolderID,
NoticePublicationID: t.NoticePublicationID,
DocumentURL: documentURL,
Title: t.Title,