File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/ita/tinybite/domain/user/entity Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1313import java .time .LocalDateTime ;
1414import java .util .ArrayList ;
1515import java .util .List ;
16+ import java .util .Random ;
17+ import java .util .UUID ;
1618
1719@ Entity
1820@ Table (name = "users" )
@@ -77,8 +79,13 @@ public void addTerms(List<UserTermAgreement> agreements) {
7779 }
7880
7981 public void withdraw () {
80- this .nickname = "탈퇴한 사용자" ;
82+ String uniqueId = UUID .randomUUID ().toString ().substring (0 , 8 );
83+ this .nickname = "탈퇴한 사용자" + uniqueId ;
8184 this .profileImage = "/images/default-profile.jpg" ;
85+ this .email = "withdrawn_" + uniqueId + "@deleted.com" ;
86+ this .phone = String .format ("010-%04d-%04d" ,
87+ new Random ().nextInt (10000 ),
88+ new Random ().nextInt (10000 ));
8289 this .status = UserStatus .WITHDRAW ;
8390 this .withdrawAt = LocalDateTime .now ();
8491 }
You can’t perform that action at this time.
0 commit comments