I have a User
model. A user can be reviewed. Thus I also have a Review
model that represents a review of the user. With the review a rating of the user is saved.
Let's say I am to create a method that fetches the rating of the user based on all reviews of him, for example the getRating()
method. Would I create this method on the User
model? Or would you create for example a review-managing service class and include the method in that class?
Adding the getRating()
method to the User
model feels like a logical thing to do, but on the other hand things might get out of hand at one point, leaving me with a huge User
model class.
(This is a simplified example, in reality the reviews can come from multiple sources).
(PS I have read some posts and articles about this, but I cannot find a satisfactory answer to my question).