Skip to content

Commit

Permalink
feat: 프로필 조회시 이메일 인증여부 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
EUNCHAEv1006 committed Jan 29, 2024
1 parent 2ba2f88 commit e06d224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class UserInfoResponseDTO {
private String description;
private String majorCategory;
private String subCategory;
private boolean emailVerified;

public UserInfoResponseDTO(User user) {
this.userId = user.getId();
Expand All @@ -27,5 +28,7 @@ public UserInfoResponseDTO(User user) {
if (user.getSubCategory() != null) {
this.subCategory = user.getSubCategory().name();
}

this.emailVerified = user.isEmailVerified();
}
}
10 changes: 5 additions & 5 deletions src/main/java/com/HHive/hhive/domain/user/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ public class User extends BaseTimeEntity {

// 이메일 인증 여부 필드 추가
@Column(nullable = false)
private boolean email_verified = false;
private boolean emailVerified = false;

// 이메일 인증 코드 필드 추가
@Column
private String email_verification_code;
private String emailVerificationCode;

public User(String username, String password, String email, String description) {
this.username = username;
Expand Down Expand Up @@ -104,16 +104,16 @@ public void setSubCategory(SubCategory subCategory) {

// 이메일 인증 상태를 업데이트하는 메서드 추가
public void setEmailVerified(boolean emailVerified) {
this.email_verified = emailVerified;
this.emailVerified = emailVerified;
}

// 이메일 인증 코드를 업데이트하는 메서드 추가
public void setEmailVerificationCode(String emailVerificationCode) {
this.email_verification_code = emailVerificationCode;
this.emailVerificationCode = emailVerificationCode;
}

// 이메일 인증 코드를 가져오는 메서드 추가
public String getEmailVerificationCode() {
return this.email_verification_code;
return this.emailVerificationCode;
}
}

0 comments on commit e06d224

Please sign in to comment.