21b736b55b
- Introduced a new feedback management system, including the creation of feedback entities, services, and repositories. - Implemented CRUD operations for feedback, allowing users to submit likes and dislikes on tenders. - Developed administrative endpoints for listing and retrieving feedback with comprehensive filtering options. - Enhanced public API to allow users to view feedback related to tenders. - Updated Swagger documentation to reflect new feedback endpoints and their functionalities. - Removed obsolete configuration file `config.yaml` as part of the transition to a modular configuration system. - Ensured adherence to Clean Architecture principles throughout the implementation.
20 lines
891 B
Go
20 lines
891 B
Go
package feedback
|
|
|
|
import "errors"
|
|
|
|
// Custom errors for feedback domain
|
|
var (
|
|
ErrFeedbackNotFound = errors.New("feedback not found")
|
|
ErrFeedbackAlreadyExists = errors.New("feedback already exists for this tender and user")
|
|
ErrInvalidFeedbackType = errors.New("invalid feedback type")
|
|
ErrInvalidRating = errors.New("invalid rating value")
|
|
ErrInvalidComment = errors.New("invalid comment")
|
|
ErrInvalidDateRange = errors.New("invalid date range: date_from must be before date_to")
|
|
ErrUnauthorizedAccess = errors.New("unauthorized access to feedback")
|
|
ErrFeedbackDeleted = errors.New("feedback has been deleted")
|
|
ErrTenderNotFound = errors.New("tender not found")
|
|
ErrUserNotFound = errors.New("user not found")
|
|
ErrCustomerNotFound = errors.New("customer not found")
|
|
ErrCompanyNotFound = errors.New("company not found")
|
|
)
|