Skip to content

Commit

Permalink
Merge pull request #104 from TeamSobokSobok/develop
Browse files Browse the repository at this point in the history
[Feat]: 유저 디바이스 토큰 및 유저 이름 유니크 제외 (#103)
  • Loading branch information
dev-Crayon authored Mar 5, 2024
2 parents e32abd9 + 0f5b4b4 commit 2e30513
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 2e30513

Please sign in to comment.