ubclaunchpad / ratemycourse

2 stars 1 forks source link

Restructure objects #30

Closed AnnieZhou08 closed 6 years ago

AnnieZhou08 commented 6 years ago

Restructured User Object Note: I realized that if you add in ArrayList fields, and try to construct a new object with a non-empty ArrayList field, it doesn't actually show up in Firebase. However if you do something like: "userReference.child("friends").setValue(new ArrayList("asdfadf"));" it would show up, which is weird. Nonetheless, I have added in those fields in the User class. Note2: I saw there is another overloading constructor for User. I think @Luxi-Zhao might have added them. Is it okay if we remove it later if there's no use for it?

I will do restructuring for Comments and other objects later. Sorry I didn't have Sunday off :( But if you are already developing and you need to insert in those fields, just follow the UML diagram.

AnnieZhou08 commented 6 years ago

@Luxi-Zhao @scveloso @eishan05 code review please thanks! 😄

AnnieZhou08 commented 6 years ago

Also I have added in a Note class Important: the "time" field in Note class would automatically be set whenever you create a Note. This would save you the trouble to get the current time every time when the user tries to add a note. Maybe I should have a set time member function as well.

AnnieZhou08 commented 6 years ago

@eishan05 @Luxi-Zhao @scveloso All of the classes should be done. I'll find time to create a firebase-endpoint class so it's more unified. I'm working on the user-stories which will help with "not missing stuff" 😄