Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clubs -- models #37

Open
11 tasks done
Levi-Lesches opened this issue Apr 19, 2021 · 0 comments
Open
11 tasks done

Clubs -- models #37

Levi-Lesches opened this issue Apr 19, 2021 · 0 comments
Assignees
Labels
New feature This issue may not have complete information

Comments

@Levi-Lesches
Copy link
Member

Levi-Lesches commented Apr 19, 2021

This is the middle layer (often referred to as "middleware") between the backend and the frontend. It's job is to unify backend functions and data in a way that's natural and corresponds to the way the user interacts with the app. In other words, specific actions should be mapped to functions in the middleware, which interacts with the backend accordingly.

Goals:

ClubsModel

Defines actions any user can take

  • List<Club> getAllClubs() -- Gets all clubs from Firebase
  • List<Club> getUserClubs() -- Gets the clubs this user is registered to (see User.registeredClubs)
  • Future<void> registerForClub(Club club) -- registers for a club
  • Future<void> unregisterFromClub(Club club) -- unregisters from a club
  • Future<void> addPhoneNumber(String number) -- adds phoneNumber to User.contactInfo

ClubCaptainModel

Defines actions for club captains/faculty advisors. Takes a Club as parameter

  • Future<void> uploadClub(Club newClub) -- updates/creates a club in the database
  • Future<void> removeMember(String email) -- removes a user from the club
  • Future<void> postMessage(Message message) -- posts a message to all users
  • Future<void> takeAttendance(List<String> members) -- takes attendance

ClubAdminModel

Defines actions for club administrators (like Dov)

  • Future<void> approveClub(Club club) -- approves a club for viewing/joining
  • Future<void> deleteClub(Club club) -- deletes a club (will have confirmation in the UI)
@Levi-Lesches Levi-Lesches added the New feature This issue may not have complete information label Apr 19, 2021
@Levi-Lesches Levi-Lesches added the blocked This issue is waiting for another issue to close label Apr 21, 2021
@Levi-Lesches Levi-Lesches removed the blocked This issue is waiting for another issue to close label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature This issue may not have complete information
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants