Files
tm_back/ted/eform/tendering_terms.go
T
n.nakhostin 05c7eae8a2 Add TED Scraper Configuration and Cron Scheduler Implementation
- Introduced a new configuration file for the TED scraper, defining database connection settings, logging preferences, and scraping parameters.
- Implemented a CronScheduler to manage scheduled tasks for TED operations, utilizing the robfig/cron library for scheduling.
- Added new entities and structures for handling TED XML data, including eForms and tender-related information, enhancing the scraper's functionality.
- Updated the main application to initialize the TED scraper with the new configuration and set up graceful shutdown handling.
- Removed the deprecated scraping implementation to streamline the codebase and focus on the new architecture.
2025-09-30 16:03:53 +03:30

86 lines
3.4 KiB
Go

package eform
import (
"encoding/xml"
"time"
)
// =====================================================
// TENDERING TERMS
// =====================================================
// TenderingTerms represents tendering terms
type TenderingTerms struct {
TendererQualificationRequest []TendererQualificationRequest `json:"tenderer_qualification_request,omitempty" xml:"TendererQualificationRequest,omitempty"`
AppealTerms AppealTerms `json:"appeal_terms,omitempty" xml:"AppealTerms,omitempty"`
CallForTendersDocumentReference CallForTendersDocumentReference `json:"call_for_tenders_document_reference,omitempty" xml:"CallForTendersDocumentReference,omitempty"`
TenderRecipientParty TenderRecipientParty `json:"tender_recipient_party,omitempty" xml:"TenderRecipientParty,omitempty"`
UBLExtensions UBLExtensions `json:"ubl_extensions,omitempty" xml:"UBLExtensions,omitempty"`
}
// TendererQualificationRequest represents qualification requirements
type TendererQualificationRequest struct {
SpecificTendererRequirement []SpecificTendererRequirement `json:"specific_tenderer_requirement,omitempty" xml:"SpecificTendererRequirement,omitempty"`
}
// SpecificTendererRequirement represents specific requirements
type SpecificTendererRequirement struct {
XMLName xml.Name `xml:"SpecificTendererRequirement"`
TendererRequirementTypeCode string `xml:"TendererRequirementTypeCode"`
Description string `xml:"Description,omitempty"`
}
// AppealTerms represents appeal terms for review organization
type AppealTerms struct {
XMLName xml.Name `xml:"AppealTerms"`
AppealReceiverParty AppealReceiverParty `xml:"AppealReceiverParty"`
}
// AppealReceiverParty represents the party that receives appeals
type AppealReceiverParty struct {
XMLName xml.Name `xml:"AppealReceiverParty"`
PartyIdentification PartyIdentification `xml:"PartyIdentification"`
}
// CallForTendersDocumentReference represents document reference
type CallForTendersDocumentReference struct {
XMLName xml.Name `xml:"CallForTendersDocumentReference"`
ID string `xml:"ID"`
DocumentType string `xml:"DocumentType,omitempty"`
Attachment Attachment `xml:"Attachment"`
UBLExtensions UBLExtensions `xml:"UBLExtensions,omitempty"`
}
// Attachment represents document attachment
type Attachment struct {
ExternalReference ExternalReference `json:"external_reference" xml:"ExternalReference"`
}
// ExternalReference represents external document reference
type ExternalReference struct {
XMLName xml.Name `xml:"ExternalReference"`
URI string `xml:"URI"`
}
// TenderRecipientParty represents the party that receives tenders
type TenderRecipientParty struct {
XMLName xml.Name `xml:"TenderRecipientParty"`
EndpointID string `xml:"EndpointID"`
}
// EOSize represents economic operator size restrictions
type EOSize string
const (
EOSizeNone EOSize = "none"
EOSizeSME EOSize = "sme"
EOSizeNotSME EOSize = "not-sme"
)
// TenderOpening represents tender opening information
type TenderOpening struct {
DateTime time.Time `json:"date_time" xml:"date_time" validate:"required"`
Place string `json:"place,omitempty" xml:"place,omitempty" validate:"max=500"`
Description string `json:"description,omitempty" xml:"description,omitempty" validate:"max=2000"`
}