enhance tender mapping with additional notice fields and processing metadata

This commit is contained in:
hadi barzegar
2026-04-16 11:56:01 +03:30
parent 7145977250
commit 6c76b7bcac
+17
View File
@@ -474,6 +474,23 @@ func (w *NoticeWorker) ToTender(n *notice.Notice) (*tender.Tender, error) {
t.MainClassification = n.MainClassification t.MainClassification = n.MainClassification
t.AdditionalClassifications = n.AdditionalClassifications t.AdditionalClassifications = n.AdditionalClassifications
t.OfficialLanguages = n.OfficialLanguages t.OfficialLanguages = n.OfficialLanguages
t.Status = tender.TenderStatus(n.Status)
t.Source = tender.TenderSource(n.Source)
t.ContractNoticeID = n.ContractNoticeID
t.ContractFolderID = n.ContractFolderID
t.SourceFileURL = n.SourceFileURL
t.SourceFileName = n.SourceFileName
// Preserve document-scraping/summarization flags on the tender (managed by
// downstream workers), but refresh the notice-side processing metadata.
t.ProcessingMetadata.ScrapedAt = n.ProcessingMetadata.ScrapedAt
t.ProcessingMetadata.ProcessedAt = n.ProcessingMetadata.ProcessedAt
t.ProcessingMetadata.ProcessingVersion = n.ProcessingMetadata.ProcessingVersion
t.ProcessingMetadata.ParsingErrors = n.ProcessingMetadata.ParsingErrors
t.ProcessingMetadata.ValidationErrors = n.ProcessingMetadata.ValidationErrors
t.ProcessingMetadata.EnrichmentData = n.ProcessingMetadata.EnrichmentData
t.ProcessingMetadata.TranslatedData = n.ProcessingMetadata.TranslatedData
t.ProcessingMetadata.TranslatedAt = n.ProcessingMetadata.TranslatedAt
t.ProcessingMetadata.Processed = n.ProcessingMetadata.Processed
t.CancellationReason = n.CancellationReason t.CancellationReason = n.CancellationReason
t.CancellationDate = n.CancellationDate t.CancellationDate = n.CancellationDate
t.AwardDate = n.AwardDate t.AwardDate = n.AwardDate