I am currently building a university social platform. So in the current design, I stored the current user as class User and the user has a property named friends which is the type Array<User>. I am not sure if it is a good design now. Since User class also stores Array<Course> which may not be necessary for the user (only the course name is fine).
So should I create a class named Friend for the friend, or should I keep using class User for the friend?
Aucun commentaire:
Enregistrer un commentaire