Skip to content

Commit

Permalink
[Feat]: 유저 디바이스 토큰 및 유저 이름 유니크 제외 (#103)
Browse files Browse the repository at this point in the history
컬럼 속성변경

Related to: #102
  • Loading branch information
dev-Crayon authored Mar 5, 2024
1 parent 1bfab41 commit 0f5b4b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/io/sobok/SobokSobok/auth/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public class User extends BaseEntity implements UserDetails {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(nullable = false, unique = true)
@Column
private String username;

@Embedded
private SocialInfo socialInfo;

@Column(nullable = false, unique = true)
@Column
private String deviceToken;

@Column(nullable = false)
Expand Down Expand Up @@ -66,8 +66,8 @@ public void changeUsername(String username) {
}

public void deleteUser(String leaveReason) {
this.deviceToken = "";
this.username = "";
this.deviceToken = null;
this.username = null;
this.isDeleted = true;
this.leaveReason = leaveReason;
this.deletedAt = LocalDateTime.now();
Expand Down

0 comments on commit 0f5b4b4

Please sign in to comment.