-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEAT] 애플 소셜 탈퇴 기능 구현
- Loading branch information
Showing
16 changed files
with
202 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/org/websoso/WSSServer/domain/WithdrawalReason.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.websoso.WSSServer.domain; | ||
|
||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class WithdrawalReason { | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(nullable = false) | ||
private Long withdrawalReasonId; | ||
|
||
@Column(columnDefinition = "varchar(80)", nullable = false) | ||
private String withdrawalReasonContent; | ||
|
||
private WithdrawalReason(String withdrawalReasonContent) { | ||
this.withdrawalReasonContent = withdrawalReasonContent; | ||
} | ||
|
||
public static WithdrawalReason create(String withdrawalReasonContent) { | ||
return new WithdrawalReason(withdrawalReasonContent); | ||
} | ||
} |
9 changes: 5 additions & 4 deletions
9
src/main/java/org/websoso/WSSServer/domain/common/DiscordWebhookMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
package org.websoso.WSSServer.domain.common; | ||
|
||
public record DiscordWebhookMessage( | ||
String content | ||
String content, | ||
DiscordWebhookMessageType type | ||
) { | ||
public static DiscordWebhookMessage of(String content) { | ||
|
||
public static DiscordWebhookMessage of(String content, DiscordWebhookMessageType type) { | ||
if (content.length() >= 2000) { | ||
content = content.substring(0, 1993) + "\n...```"; | ||
} | ||
return new DiscordWebhookMessage(content); | ||
return new DiscordWebhookMessage(content, type); | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/org/websoso/WSSServer/domain/common/DiscordWebhookMessageType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.websoso.WSSServer.domain.common; | ||
|
||
public enum DiscordWebhookMessageType { | ||
WITHDRAW, REPORT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/org/websoso/WSSServer/repository/UserAppleTokenRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
package org.websoso.WSSServer.repository; | ||
|
||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
import org.websoso.WSSServer.domain.User; | ||
import org.websoso.WSSServer.domain.UserAppleToken; | ||
|
||
@Repository | ||
public interface UserAppleTokenRepository extends JpaRepository<UserAppleToken, Long> { | ||
|
||
Optional<UserAppleToken> findByUser(User user); | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/websoso/WSSServer/repository/WithdrawalReasonRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.websoso.WSSServer.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
import org.websoso.WSSServer.domain.WithdrawalReason; | ||
|
||
@Repository | ||
public interface WithdrawalReasonRepository extends JpaRepository<WithdrawalReason, Long> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.