Skip to content

Commit

Permalink
chore: nullable 재설정 및 default 지정 #214
Browse files Browse the repository at this point in the history
  • Loading branch information
ozzing committed Sep 9, 2022
1 parent 95517dc commit 49fab88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/com/ceos/bankids/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public class User extends AbstractTimestamp implements UserDetails {
@Column(nullable = false, length = 10)
private String username;

@Column(nullable = true)
@Column()
private Boolean isFemale;

@Column(nullable = true, length = 8)
@Column(length = 8)
private String birthday;

@Column(nullable = true, length = 12, unique = true)
@Column(length = 12, unique = true)
private String phone;

@Column(name = "authentication_code", nullable = false, unique = true)
Expand All @@ -55,7 +55,7 @@ public class User extends AbstractTimestamp implements UserDetails {
@Column(nullable = false, length = 10)
private String provider;

@Column(nullable = true)
@Column()
private Boolean isKid;

@Column(columnDefinition = "TEXT")
Expand All @@ -64,11 +64,11 @@ public class User extends AbstractTimestamp implements UserDetails {
@Column(columnDefinition = "TEXT")
private String expoToken;

@Column(nullable = false)
@Column()
@ColumnDefault("false")
private Boolean noticeOptIn;

@Column(nullable = false)
@Column()
@ColumnDefault("false")
private Boolean serviceOptIn;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/ceos/bankids/service/UserServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public LoginDTO loginWithKakaoAuthenticationCode(KakaoUserDTO kakaoUserDTO) {
.username(username)
.authenticationCode(kakaoUserDTO.getAuthenticationCode())
.provider(provider).refreshToken("")
.noticeOptIn(false).serviceOptIn(false)
.build();
uRepo.save(newUser);

Expand Down Expand Up @@ -85,6 +86,7 @@ public LoginDTO loginWithAppleAuthenticationCode(String authenticationCode,
.username(username)
.authenticationCode(authenticationCode)
.provider("apple").refreshToken("")
.noticeOptIn(false).serviceOptIn(false)
.build();
uRepo.save(newUser);

Expand Down

0 comments on commit 49fab88

Please sign in to comment.