Skip to content

Commit

Permalink
✨Feat: User Entity 팔로우 기능 추가 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
win-luck committed Oct 2, 2023
1 parent fb1005e commit 0a34877
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/com/diareat/diareat/user/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@ public static User createUser(String name, String keyCode, int height, int weigh
}

// 회원정보 수정
public void updateUser(String name, int height, int weight, int gender, int age, BaseNutrition baseNutrition) {
public void updateUser(String name, int height, int weight, int age, BaseNutrition baseNutrition) {
this.name = name;
this.height = height;
this.weight = weight;
this.gender = gender;
this.age = age;
this.baseNutrition = baseNutrition;
}

public void followUser(User user) {
this.followings.add(user);
}

public void unfollowUser(User user) {
this.followings.remove(user);
}
}

0 comments on commit 0a34877

Please sign in to comment.