Skip to content

Commit

Permalink
feat: 사용자 엔티티 수정(#27)
Browse files Browse the repository at this point in the history
- 요구사항 변경에 따라 음주 성향, 흡연 성향 필드 삭제
- 성별 정보 제공 메서드 추가
  • Loading branch information
Minjae-An committed Mar 13, 2024
1 parent 87ec03e commit e6f7eb1
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions be/src/main/java/yeonba/be/user/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ public class User {
@Column(nullable = false)
private String job;

@Column(nullable = false)
private String drinkingHabit;

@Column(nullable = false)
private String smokingHabit;

@Column(nullable = false)
private String mbti;

Expand Down Expand Up @@ -118,14 +112,11 @@ public User(
double photoSyncRate,
String bodyType,
String job,
String drinkingHabit,
String smokingHabit,
String mbti,
VocalRange vocalRange,
Animal animal,
Area area,
List<ProfilePhoto> profilePhotos,
LocalDateTime lastAccessedAt) {
List<ProfilePhoto> profilePhotos) {
this.gender = gender;
this.name = name;
this.nickname = nickname;
Expand All @@ -141,14 +132,11 @@ public User(
this.inactiveStatus = true;
this.bodyType = bodyType;
this.job = job;
this.drinkingHabit = drinkingHabit;
this.smokingHabit = smokingHabit;
this.mbti = mbti;
this.vocalRange = vocalRange;
this.animal = animal;
this.area = area;
this.profilePhotos = profilePhotos;
this.lastAccessedAt = lastAccessedAt;
}

public void validateSameUser(User user) {
Expand Down Expand Up @@ -210,4 +198,12 @@ public void minusArrow(int arrow) {

this.arrow -= arrow;
}

public String getGender() {
if (this.gender) {
return "남";
}

return "여";
}
}

0 comments on commit e6f7eb1

Please sign in to comment.