Skip to content

feat(categories): add category suggestion and approval system

Surya Manoj Pentakota requested to merge category-approval-system into develop

feat(categories): add category suggestion and approval system

Description

This MR implements a comprehensive category suggestion and approval system that allows users to suggest new categories through a structured workflow. Admins can review, approve, or reject user suggestions while maintaining control over the category system. The implementation includes:

  • New database fields: approved (boolean) ,suggested_by (UUID) ,approved_by (UUID)
  • Updated category schemas with CategorySuggest model for user submissions
  • New endpoints: /suggest, /pending (admin), /my-suggestions, /{id}/approve (admin), /{id}/reject (admin)
  • Enhanced security with proper role-based access control
  • Duplicate prevention with case-insensitive name validation
  • Flexible approval system with optional publishing
  • Complete audit trail tracking suggestions and approvals

Checklist

  • The feature has been fully implemented.
  • Tests for the new feature are included and passing.
  • User documentation/guides have been updated (if applicable).
  • Impact on existing functionality has been considered.

Related Issue(s)

Closes #

Merge request reports

Loading