-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DPMBE-128] 유저 도착 이벤트를 받아 FCM Message 발송과 알림을 저장한다 #220
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...src/main/kotlin/com/depromeet/whatnow/api/notification/dto/ArrivalNotificationResponse.kt
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,21 @@ | ||
package com.depromeet.whatnow.api.notification.dto | ||
|
||
import com.depromeet.whatnow.domains.notification.domain.ArrivalNotification | ||
import com.depromeet.whatnow.domains.notification.domain.NotificationType | ||
import java.time.LocalDateTime | ||
|
||
class ArrivalNotificationResponse( | ||
val promiseId: Long, | ||
val senderUserId: Long, | ||
override val createdAt: LocalDateTime, | ||
) : NotificationAbstract(NotificationType.START_SHARING, createdAt) { | ||
companion object { | ||
fun from(notification: ArrivalNotification): ArrivalNotificationResponse { | ||
return ArrivalNotificationResponse( | ||
notification.promiseId, | ||
notification.senderUserId, | ||
notification.createdAt, | ||
) | ||
} | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
.../src/main/kotlin/com/depromeet/whatnow/domains/notification/domain/ArrivalNotification.kt
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,14 @@ | ||
package com.depromeet.whatnow.domains.notification.domain | ||
|
||
import javax.persistence.DiscriminatorValue | ||
import javax.persistence.Entity | ||
|
||
@Entity | ||
@DiscriminatorValue("ARRIVAL") | ||
class ArrivalNotification( | ||
var promiseId: Long, | ||
|
||
var senderUserId: Long, | ||
|
||
override var targetUserId: Long, | ||
) : Notification(targetUserId) |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전체적으로 SRP 준수하게 변경해도 좋을 것 같아요 private 하게 data, intersects district 관련 조회들은 분리해볼 수 있지 않을까요? ㅎㅎ 동작 하기만 하면 상관 없지만 리펙토링 다음에 같이 해요 ㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fcm 발송하는 쪽 전체적으로 리팩토링이 필요할 것 같아요!!
감사합니다 🙇🏻