fleencorp / fleen-feen

Fleen Feen connects you with the world
GNU General Public License v3.0
0 stars 1 forks source link

Refactor and Enhance Stream Speaker Management #60

Closed aalamu closed 1 month ago

aalamu commented 1 month ago

Summary

This pull request introduces several enhancements and refactorings related to stream speakers, including new data transfer objects (DTOs), response classes, and mappers. It also includes updates to validation, access control, and general code improvements.

Changes Made

  1. Stream Speaker Data Transfer Objects (DTOs):

    • Added StreamSpeakerDto, AddStreamSpeakerDto, and UpdateStreamSpeakerDto to facilitate actions related to stream speakers.
  2. Code Cleanup and Optimization:

    • Removed @ToString annotations from classes where it was not applicable.
    • Replaced occurrences of emptyList() with List.of() in mapper classes to enhance code clarity and efficiency.
  3. Country API Access:

    • Updated CountryController to allow user access to the Country API.
  4. Enum to Class Replacement:

    • Replaced the enum-based approach with a class-based approach in CountryMapper.
  5. New Response Classes:

    • Added new response classes for Stream Speaker actions:
      • GetStreamSpeakersResponse
      • StreamSpeakerResponse
      • AddStreamSpeakerResponse
      • UpdateStreamSpeakerResponse
  6. Stream Speaker Mapper:

    • Implemented StreamSpeakerMapper to map StreamSpeaker domain entities to StreamSpeakerResponse objects.
  7. Member Existence Validation:

    • Introduced MemberExist annotation and MemberExistValidator for validating if a user exists by ID.
    • Added MemberRepository.existsByMemberId() method to support MemberExistValidator.
  8. Service Updates:

    • Added new methods in StreamSpeakerService for interacting with StreamSpeakerRepository.
  9. Internationalization:

    • Updated ValidationMessages.properties and other message source files for improved localization.
  10. Documentation:

    • Added comprehensive documentation for newly introduced and modified classes.
  11. Validation:

    • Implemented validation to ensure that Stream Speaker Member IDs correspond to valid members.

Additional Notes

Action Items