I will implement service $matchingRequest with the following 3 functions:
joinTeam(fromUserUid, toTeamUid, eventUid):
An user requests to join a team in an event
It returns a Promise(status):
status = $matchingRequest.REQUEST_MATCH: A match is found.
status = $matchingRequest.REQUEST_NOMATCH: No match is found at the moment
status = $matchingRequest.REQUEST_INVALID: This request is invalid
inviteMember(fromTeamUid, toMemberUid, eventUid):
A team wants to invite a new member to join in an event
It returns a Promise(status):
status = $matchingRequest.REQUEST_MATCH: A match is found.
status = $matchingRequest.REQUEST_NOMATCH: No match is found at the moment
status = $matchingRequest.REQUEST_INVALID: This request is invalid
acceptMatch (teamUid, userUid, eventUid, maxMemberPerTeam): If A MATCH IS FOUND between a team and an user, then call this function to save the matching into Firebase database
I will implement service $matchingRequest with the following 3 functions:
joinTeam(fromUserUid, toTeamUid, eventUid):
inviteMember(fromTeamUid, toMemberUid, eventUid):
acceptMatch (teamUid, userUid, eventUid, maxMemberPerTeam): If A MATCH IS FOUND between a team and an user, then call this function to save the matching into Firebase database