ust-helloworld / The-Avengers-forming

This project is an application skeleton. It is used for a HKUST Software Engineering Course (COMP3111/H) in Fall 2016/17. My goal: The project is not asking students to re-produce the sample project. We should encourage students to do something better than the TA.
https://course.cse.ust.hk/comp3111/teamform/
MIT License
0 stars 6 forks source link

Firebase structure clarification #11

Open robbieyang opened 7 years ago

robbieyang commented 7 years ago

Since I am responsible for team merge and invitation(to members) functions, I would like to add 2 child node under team in Firebase json structure:

The basic logic is that, for sender, we will open a child node to store the information of receiver. Two child nodes above are set under team. If any questions, please raise. Thanks.

wai2016 commented 7 years ago

OK that's good. Since our firebase structure will be different and our common facebook account is banned by facebook T.T, I have added site.js (about the firebase config) to .gitignore.txt #13. As a result, we can test our own features in our own firebase without changing the firebase config.

p-wong1124 commented 7 years ago

Thx Wai for excluding the site.js :) sorry for facebook T_T

p-wong1124 commented 7 years ago

Also, I would like to put the member profile folder on the root of the firebase database :) and all member profiles are accessed by their own UID.

p-wong1124 commented 7 years ago

I am going to use this structure ps. edited at 12/11/2016

in /

event <---used to save event user <---used to save user profile

in /event

abc <---- an example of event def <-----an another example of event

in /event/abc

admin <---used to store param(maxTeamNum&minTeamNum,imgURL, description,), and owner (renewed on 13/11/2016) member <--- used to store user who entered to the event team <--- used to store team data

in /event/abc/admin/ (update in 14/11)

param <-- contains maxTeamNum, minTeamNum, imgURL, description owner <-- who can edit the parameters of param and perform group merge (force)

in /event/abc/team

teamA <---- example of team teamB <-----example of team

in /event/abc/team/teamA

leader: userA <---data to store who owns the team size: 8 <-----the size of the team teamMember:["wow","asdf"]<-- array of members who entered the team. mergeRequests: ["teamB"] <-- if teamA wants to merge with teamB, teamA sends a mergeRequest #11 (proposed) invitationRequests: ["xdd"] <-- if teamA wants to invite one member with no team joined, teamA sends a invitation. (proposed)

in /event/abc/member/xdd

name: "xdd" <--his displayname selection : ["teamA","teamB"] <-- sending invitation to both team joinedTeam : <--- empty string if no group, team name will be stored if the user has join a team (proposed)

in /user

userA <---folder storing userA's detail wow <----folder storing wow's detail

in /user/userA

description : "hello I am userA" <--- string data for storing description name: "User A" <---string showing display name skill: ["C++","Python"] <---array to store his skill comments : ["not very good ar","why this will be happen"] <--store other's comments towards this person own: ["/event/abc/team/teamA"] <--an array storing his permission on editing sth <--proposed and wait for discussion

robbieyang commented 7 years ago

I am re-constructing the flow of team management. There should be one more child node under member indicating that the member has joined a team to avoid a member having more than one team. I am wondering how to store the information, to store the name of the team that the member has joined or just to have true/false to indicate?

p-wong1124 commented 7 years ago

to store the name of the team la if it is undefine/null then it is indicated as not in the group 😝

wai2016 commented 7 years ago

I think a bool value is ok.

And I think the structure now is fine.

robbieyang commented 7 years ago

@p-wong1124 If the user has no team, I will store empty string -> joinedTeam = ""

p-wong1124 commented 7 years ago

Will empty string will be stored by firebase ?? 😛 @robbieyang

p-wong1124 commented 7 years ago

@wai2016 inside the event, I had put the description and also imgURL into it ;)

robbieyang commented 7 years ago

Every newly joined member will automatically assigned an empty string to joinedTeam(the new child node) in firebase @p-wong1124

robbieyang commented 7 years ago

It may be useful in future if I store the name of the team that the member has joined in the firebase @wai2016

robbieyang commented 7 years ago

Another question: Are you going to remove the name of members in the firebase? @p-wong1124

wai2016 commented 7 years ago

Awesome. 😄

p-wong1124 commented 7 years ago

@robbieyang if you ensure that crossing out name can keep member's record on the event/member then it is ok. But I don't have plan on that :smiley: BTW it just for easy access for member's name :yum:

p-wong1124 commented 7 years ago

I have updated the stated structure plz check

main changes:

in /event/abc/admin/

param <-- contains maxTeamNum, minTeamNum, imgURL, description owner <-- who can edit the parameters of param and perform group merge (force)