fleencorp / fleen-feen

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

Refactor and Update Live Broadcast and Event Services #38

Closed aalamu closed 1 week ago

aalamu commented 1 week ago

Description

This issue covers a comprehensive set of updates, refactoring, and enhancements across various components of the application, focusing on live broadcasts, events, localization, database schema, and controller methods.

Tasks

  1. Rename and Fix Issues:

    • Rename Unblock to Unblocked in BlockStatus.
    • Fix the incorrect table name in BlockUser.
  2. Code Refactoring:

    • Add final modifiers to method variables and parameters for immutability.
    • Refactor CreateLiveBroadcastRequest to extend LiveBroadcastRequest.
    • Move classes, including DataForCreateStreamResponse, to the broadcast package.
    • Refactor EventController and LiveBroadcastController to move @PreAuthorize annotations from the class level to individual route handler methods.
    • Refactor EventService, LiveBroadcastService, and LiveBroadcastServiceImpl for better code organization.
    • Move common or shared methods to StreamService.
  3. Database Updates:

    • Refactor the Liquibase create-schema SQL file to:
      • Fix bugs and typos.
      • Add timestamp columns (created_on & updated_on).
      • Modify column options, including title and description in the stream_speaker table.
  4. Class and Variable Modifications:

    • Rename EventAttendeeResponse.java and EventAttendeesResponse.java to EventOrStreamAttendeeResponse and EventOrStreamAttendeesResponse.java.
    • Add getVisibility() method in LiveBroadcastRequest.
    • Change the variable modifier for accessToken from private to protected in relevant classes.
  5. Update Controllers:

    • Add new route handler methods in UserLiveBroadcastController.
    • Update RescheduleLiveBroadcastRequest, UpdateLiveBroadcastRequest, and UpdateLiveBroadcastVisibilityRequest to include accessToken.
  6. Localization:

    • Add localized responses and update message sources to support internationalization (i18n).
  7. Other Enhancements:

    • Refactor StreamAttendeeMapper.
    • Update LiveBroadcastServiceImpl.java to list assignable categories using YouTubeChannelService.listAssignableCategories().
    • Refactor and add new classes, including TotalStreamsAttendedByUserResponse and TotalStreamsCreatedByUserResponse.

Notes

Expected Outcome

Successful completion of these tasks will result in a more organized codebase, enhanced internationalization support, improved database schema, and more flexible and descriptive controller methods.