Refactor Tender Entity and TED Parser for Clarity and Consistency

- Updated the Tender entity to remove redundant comments on Unix timestamp fields, enhancing code readability.
- Renamed the AwardedEntity type to Awarded for improved clarity and consistency in naming conventions.
- Removed the transformPriorInformationNoticeToContractNotice method from TEDParser, streamlining the parser's functionality and reducing legacy code.
This commit is contained in:
n.nakhostin
2025-09-28 11:59:24 +03:30
parent f57e53bd9b
commit 96d3b4fb9c
2 changed files with 8 additions and 13 deletions
+8 -8
View File
@@ -17,12 +17,12 @@ type Tender struct {
NoticeTypeCode string `bson:"notice_type_code" json:"notice_type_code"`
NoticeSubTypeCode string `bson:"notice_sub_type_code" json:"notice_sub_type_code"`
NoticeLanguageCode string `bson:"notice_language_code" json:"notice_language_code"`
IssueDate int64 `bson:"issue_date" json:"issue_date"` // Unix milliseconds
IssueTime int64 `bson:"issue_time" json:"issue_time"` // Unix milliseconds
TenderDeadline int64 `bson:"tender_deadline" json:"tender_deadline"` // Unix milliseconds
PublicationDate int64 `bson:"publication_date" json:"publication_date"` // Unix milliseconds
SubmissionDeadline int64 `bson:"submission_deadline" json:"submission_deadline"` // Unix milliseconds
ApplicationDeadline int64 `bson:"application_deadline" json:"application_deadline"` // Unix milliseconds
IssueDate int64 `bson:"issue_date" json:"issue_date"`
IssueTime int64 `bson:"issue_time" json:"issue_time"`
TenderDeadline int64 `bson:"tender_deadline" json:"tender_deadline"`
PublicationDate int64 `bson:"publication_date" json:"publication_date"`
SubmissionDeadline int64 `bson:"submission_deadline" json:"submission_deadline"`
ApplicationDeadline int64 `bson:"application_deadline" json:"application_deadline"`
GazetteID string `bson:"gazette_id" json:"gazette_id"`
Title string `bson:"title" json:"title"`
Description string `bson:"description" json:"description"`
@@ -64,7 +64,7 @@ type Tender struct {
SuspensionReason string `bson:"suspension_reason,omitempty" json:"suspension_reason,omitempty"`
SuspensionDate int64 `bson:"suspension_date,omitempty" json:"suspension_date,omitempty"` // Unix milliseconds
Modifications []TenderModification `bson:"modifications,omitempty" json:"modifications,omitempty"`
AwardedEntities []AwardedEntity `bson:"awarded_entities,omitempty" json:"awarded_entities,omitempty"`
AwardedEntities []Awarded `bson:"awarded,omitempty" json:"awarded,omitempty"`
}
// Organization represents organization information
@@ -118,7 +118,7 @@ type TenderModification struct {
}
// AwardedEntity represents an entity that has been awarded a contract
type AwardedEntity struct {
type Awarded struct {
Name string `bson:"name" json:"name"`
Address string `bson:"address,omitempty" json:"address,omitempty"`
Country string `bson:"country,omitempty" json:"country,omitempty"`