Update Tender Approval Status to Include Submitted State and Revise API Documentation
- Changed the approval status from "approved" to "submitted" in various locations, including entity definitions, forms, and service methods, to accurately reflect the tender approval process.
- Updated API documentation in Swagger JSON, YAML, and Go files to describe the new status options ("submitted" and "rejected") and their corresponding descriptions.
- Enhanced the tender approval statistics structures to include a count for submitted tenders, improving the overall data model for tender management.
- These changes ensure clarity in the tender approval workflow and enhance the usability of the API for clients interacting with tender approvals.
This commit is contained in:
@@ -4,13 +4,13 @@ package tender_approval
|
||||
type CreateTenderApprovalForm struct {
|
||||
TenderID string `json:"tender_id" valid:"required"`
|
||||
SubmissionMode SubmissionMode `json:"submission_mode" valid:"required,in(self-apply|partnership)"`
|
||||
Status ApprovalStatus `json:"status,omitempty" valid:"optional,in(approved|rejected)"`
|
||||
Status ApprovalStatus `json:"status,omitempty" valid:"optional,in(submitted|rejected)"`
|
||||
}
|
||||
|
||||
// UpdateTenderApprovalForm represents the form for updating a tender approval
|
||||
type UpdateTenderApprovalForm struct {
|
||||
SubmissionMode *string `json:"submission_mode,omitempty" valid:"optional,in(self-apply|partnership)"`
|
||||
Status *string `json:"status,omitempty" valid:"optional,in(approved|rejected)"`
|
||||
Status *string `json:"status,omitempty" valid:"optional,in(submitted|rejected)"`
|
||||
}
|
||||
|
||||
// ListTenderApprovalsForm represents the form for listing tender approvals with filters
|
||||
@@ -61,17 +61,17 @@ type TenderApprovalSearchForm struct {
|
||||
|
||||
// TenderApproval statistics DTOs
|
||||
type TenderApprovalStatsResponse struct {
|
||||
TotalApprovals int64 `json:"total_approvals"`
|
||||
ApprovedTenders int64 `json:"approved_tenders"`
|
||||
RejectedTenders int64 `json:"rejected_tenders"`
|
||||
LastUpdated int64 `json:"last_updated"`
|
||||
TotalApprovals int64 `json:"total_approvals"`
|
||||
SubmittedTenders int64 `json:"submitted_tenders"`
|
||||
RejectedTenders int64 `json:"rejected_tenders"`
|
||||
LastUpdated int64 `json:"last_updated"`
|
||||
}
|
||||
|
||||
// CompanyTenderApprovalStatsResponse represents company-specific tender approval statistics
|
||||
type CompanyTenderApprovalStatsResponse struct {
|
||||
CompanyID string `json:"company_id"`
|
||||
TotalApprovals int64 `json:"total_approvals"`
|
||||
ApprovedTenders int64 `json:"approved_tenders"`
|
||||
SubmittedTenders int64 `json:"submitted_tenders"`
|
||||
RejectedTenders int64 `json:"rejected_tenders"`
|
||||
SelfApplyCount int64 `json:"self_apply_count"`
|
||||
PartnershipCount int64 `json:"partnership_count"`
|
||||
@@ -81,7 +81,7 @@ type CompanyTenderApprovalStatsResponse struct {
|
||||
// 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)"`
|
||||
Status ApprovalStatus `json:"status" valid:"required,in(submitted|rejected)"`
|
||||
SubmissionMode SubmissionMode `json:"submission_mode" valid:"required,in(self-apply|partnership)"`
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ type CompanyTenderApprovalStatsRequest struct {
|
||||
type AggregatedCompanyStatsResponse struct {
|
||||
TotalCompanies int64 `json:"total_companies"`
|
||||
TotalApprovals int64 `json:"total_approvals"`
|
||||
TotalApprovedTenders int64 `json:"total_approved_tenders"`
|
||||
TotalSubmittedTenders int64 `json:"total_submitted_tenders"`
|
||||
TotalRejectedTenders int64 `json:"total_rejected_tenders"`
|
||||
TotalSelfApplyCount int64 `json:"total_self_apply_count"`
|
||||
TotalPartnershipCount int64 `json:"total_partnership_count"`
|
||||
|
||||
Reference in New Issue
Block a user