Refactor Tender Approval Logic and Update Statistics Structure

- Modified the Reject method in the TenderApproval entity to reset the SubmissionMode field upon rejection, ensuring proper state management.
- Simplified the TenderApprovalStatsResponse and CompanyTenderApprovalStatsResponse structures by removing unnecessary fields related to submission modes, streamlining the data model for tender approval statistics.
- Updated the GetTenderApprovalStats and GetCompanyTenderApprovalStats methods in the repository to reflect the changes in the statistics structure, enhancing clarity and maintainability.
- These adjustments improve the overall functionality and data handling of the tender management system.
This commit is contained in:
n.nakhostin
2025-08-25 13:39:28 +03:30
parent 531f8e2baf
commit 488d43380b
4 changed files with 31 additions and 62 deletions
+1
View File
@@ -145,6 +145,7 @@ func (ta *TenderApproval) Approve() {
// Reject rejects the tender with a reason
func (ta *TenderApproval) Reject() {
ta.Status = ApprovalStatusRejected
ta.SubmissionMode = ""
ta.CreatedAt = time.Now().Unix()
}