Refactor Tender Approval Management and Update API Documentation

- Replaced the existing tender approval update and delete endpoints with a new toggle functionality, allowing for more streamlined management of tender approvals.
- Introduced the `ToggleTenderApproval` method in the service layer to handle both approval and rejection actions based on the current state of the tender approval.
- Updated the API documentation to reflect the new endpoint structure and response formats, including the `TenderApprovalWithTenderResponse`.
- Enhanced Swagger documentation to ensure accurate representation of the updated tender approval operations.
- Removed obsolete methods and routes to maintain a clean and efficient codebase, adhering to Clean Architecture principles.
This commit is contained in:
n.nakhostin
2025-08-19 11:01:49 +03:30
parent dd2573a308
commit 392b31626d
10 changed files with 298 additions and 532 deletions
+7
View File
@@ -68,3 +68,10 @@ type TenderApprovalStatsResponse struct {
ApprovalsBySubmission map[string]int64 `json:"approvals_by_submission"`
LastUpdated int64 `json:"last_updated"`
}
// ToggleTenderApprovalForm represents the form for toggling a tender approval
type ToggleTenderApprovalForm struct {
TenderID string `json:"tender_id" valid:"required"`
Status ApprovalStatus `json:"status" valid:"required,in(approved|rejected)"`
SubmissionMode SubmissionMode `json:"submission_mode" valid:"required,in(self-apply|partnership)"`
}