Skip to content

Commit

Permalink
Merge branch 'dev' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
gouyeonch committed Oct 29, 2024
2 parents 048fe42 + f072f85 commit 40e65c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/main/java/com/kkokkomu/short_news/user/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public class User {
@Column(name = "alarm_reply_yn")
private Boolean alarmReplyYn; // 대댓글 알림 여부

@Column(name = "alarm_banned_yn")
private Boolean alarmBannedYn; // 제재 대상 알림 on off
@Column(name = "alarm_inform_yn")
private Boolean alarmInformYn; // 공지 알림 on off

@Column(name = "created_at", nullable = false, updatable = false)
private LocalDateTime createdAt; // 생성 일자, 객체 생성 시 자동 설정
Expand All @@ -99,7 +99,7 @@ public class User {
private List<ProfileImg> profileImgs;

@Builder
public User(String email, String password, String nickname, LocalDate birthday, ESex sex, EUserRole role, ELoginProvider loginProvider, Boolean isLogin, String refreshToken, LocalDateTime bannedStartAt, LocalDateTime bannedEndAt, LocalDateTime deletedAt, Boolean isDeleted, Boolean privacyPolicyYn, Boolean serviceTermsYn, Boolean nightAlarmYn, Boolean alarmNewContentYn, Boolean alarmReplyYn,Boolean alarmBannedYn) {
public User(String email, String password, String nickname, LocalDate birthday, ESex sex, EUserRole role, ELoginProvider loginProvider, Boolean isLogin, String refreshToken, LocalDateTime bannedStartAt, LocalDateTime bannedEndAt, LocalDateTime deletedAt, Boolean isDeleted, Boolean privacyPolicyYn, Boolean serviceTermsYn, Boolean nightAlarmYn, Boolean alarmNewContentYn, Boolean alarmReplyYn,Boolean alarmInformYn) {
this.email = email;
this.password = password;
this.nickname = nickname;
Expand All @@ -119,7 +119,7 @@ public User(String email, String password, String nickname, LocalDate birthday,
this.nightAlarmYn = nightAlarmYn;
this.alarmNewContentYn = alarmNewContentYn;
this.alarmReplyYn = alarmReplyYn;
this.alarmBannedYn = alarmBannedYn;
this.alarmInformYn = alarmInformYn;
this.createdAt = LocalDateTime.now(); // 객체 생성 시 현재 시간으로 설정
this.editedAt = LocalDateTime.now(); // 초기값을 현재 시간으로 설정
}
Expand All @@ -144,7 +144,7 @@ public static User toGuestEntity(OAuth2UserInfo oAuth2UserInfo, String encodedPa
.nightAlarmYn(false)
.alarmNewContentYn(false)
.alarmReplyYn(false)
.alarmBannedYn(false)
.alarmInformYn(false)
.isDeleted(false)
.build();
}
Expand Down Expand Up @@ -217,10 +217,10 @@ public void hardDelete() {
}

// 알람 세팅
public void updateAlarmSetting(Boolean nightAlarmYn, Boolean alarmNewContentYn, Boolean alarmReplyYn, Boolean alarmBannedYn) {
public void updateAlarmSetting(Boolean nightAlarmYn, Boolean alarmNewContentYn, Boolean alarmReplyYn, Boolean alarmInformYn) {
this.nightAlarmYn = nightAlarmYn;
this.alarmNewContentYn = alarmNewContentYn;
this.alarmReplyYn = alarmReplyYn;
this.alarmBannedYn = alarmBannedYn;
this.alarmInformYn = alarmInformYn;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public record UpdateAlarmSettingDto(
@NotNull Boolean nightAlarmYn,
@NotNull Boolean alarmNewContentYn,
@NotNull Boolean alarmReplyYn,
@NotNull Boolean alarmBannedYn
@NotNull Boolean alarmInformYn
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public UserDto updateAlarmSetting(UpdateAlarmSettingDto updateAlarmSettingDto, L
updateAlarmSettingDto.nightAlarmYn(),
user.getAlarmNewContentYn(),
updateAlarmSettingDto.alarmReplyYn(),
updateAlarmSettingDto.alarmBannedYn());
updateAlarmSettingDto.alarmInformYn());

userRepository.save(user);

Expand Down

0 comments on commit 40e65c6

Please sign in to comment.