Files
tm_back/ted/eform/business_registration.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

78 lines
3.8 KiB
Go

package eform
import "encoding/xml"
// =====================================================
// BUSINESS REGISTRATION INFORMATION NOTICE
// =====================================================
// AdditionalNoticeLanguage represents additional notice language
type AdditionalNoticeLanguage struct {
XMLName xml.Name `xml:"AdditionalNoticeLanguage"`
ID string `json:"id" xml:"ID"`
}
// SenderParty represents the sender party
type SenderParty struct {
XMLName xml.Name `xml:"SenderParty"`
Contact Contact `json:"contact,omitempty" xml:"Contact,omitempty"`
}
// BusinessParty represents the business party
type BusinessParty struct {
XMLName xml.Name `xml:"BusinessParty"`
PostalAddress PostalAddress `json:"postal_address,omitempty" xml:"PostalAddress,omitempty"`
PartyLegalEntity []PartyLegalEntityEnhanced `json:"party_legal_entity,omitempty" xml:"PartyLegalEntity,omitempty"`
Contact Contact `json:"contact,omitempty" xml:"Contact,omitempty"`
WebsiteURI string `json:"website_uri,omitempty" xml:"WebsiteURI,omitempty"`
}
// AdditionalDocumentReference represents additional document reference
type AdditionalDocumentReference struct {
XMLName xml.Name `xml:"AdditionalDocumentReference"`
ID string `json:"id" xml:"ID"`
IssueDate string `json:"issue_date,omitempty" xml:"IssueDate,omitempty"`
ReferencedDocumentInternalAddress string `json:"referenced_document_internal_address,omitempty" xml:"ReferencedDocumentInternalAddress,omitempty"`
DocumentDescription string `json:"document_description,omitempty" xml:"DocumentDescription,omitempty"`
Attachment Attachment `json:"attachment,omitempty" xml:"Attachment,omitempty"`
}
// BusinessCapability represents business capability
type BusinessCapability struct {
XMLName xml.Name `xml:"BusinessCapability"`
CapabilityTypeCode string `json:"capability_type_code" xml:"CapabilityTypeCode"`
}
// NoticePurpose represents notice purpose
type NoticePurpose struct {
XMLName xml.Name `xml:"NoticePurpose"`
PurposeCode string `json:"purpose_code" xml:"PurposeCode"`
}
// =====================================================
// ENHANCED PARTY LEGAL ENTITY FOR BUSINESS REGISTRATION
// =====================================================
// PartyLegalEntityEnhanced represents enhanced party legal entity for business registration
type PartyLegalEntityEnhanced struct {
XMLName xml.Name `xml:"PartyLegalEntity"`
RegistrationName string `json:"registration_name,omitempty" xml:"RegistrationName,omitempty"`
CompanyID string `json:"company_id,omitempty" xml:"CompanyID,omitempty"`
RegistrationDate string `json:"registration_date,omitempty" xml:"RegistrationDate,omitempty"`
CorporateRegistrationScheme CorporateRegistrationScheme `json:"corporate_registration_scheme,omitempty" xml:"CorporateRegistrationScheme,omitempty"`
}
// CorporateRegistrationScheme represents corporate registration scheme
type CorporateRegistrationScheme struct {
XMLName xml.Name `xml:"CorporateRegistrationScheme"`
JurisdictionRegionAddress JurisdictionRegionAddress `json:"jurisdiction_region_address,omitempty" xml:"JurisdictionRegionAddress,omitempty"`
}
// JurisdictionRegionAddress represents jurisdiction region address
type JurisdictionRegionAddress struct {
XMLName xml.Name `xml:"JurisdictionRegionAddress"`
CityName string `json:"city_name,omitempty" xml:"CityName,omitempty"`
PostalZone string `json:"postal_zone,omitempty" xml:"PostalZone,omitempty"`
Country Country `json:"country,omitempty" xml:"Country,omitempty"`
}