-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Feature/yxnsx/#341-notification] 푸시 알림 기능 추가
- Loading branch information
Showing
54 changed files
with
1,631 additions
and
74 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
5 changes: 5 additions & 0 deletions
5
app/src/main/java/org/sopt/official/config/messaging/RemoteMessageLinkType.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,5 @@ | ||
package org.sopt.official.config.messaging | ||
|
||
enum class RemoteMessageLinkType { | ||
WEB_LINK, DEEP_LINK, DEFAULT | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/org/sopt/official/config/messaging/RemoteMessageType.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,5 @@ | ||
package org.sopt.official.config.messaging | ||
|
||
enum class RemoteMessageType { | ||
NOTICE, NEWS | ||
} |
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
18 changes: 18 additions & 0 deletions
18
app/src/main/java/org/sopt/official/data/mapper/NotificationHistoryItemMapper.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,18 @@ | ||
package org.sopt.official.data.mapper | ||
|
||
import org.sopt.official.data.model.notification.response.NotificationHistoryItemResponse | ||
import org.sopt.official.domain.entity.notification.NotificationHistoryItem | ||
|
||
class NotificationHistoryItemMapper { | ||
fun toNotificationHistoryItem(responseItem: NotificationHistoryItemResponse): NotificationHistoryItem { | ||
return NotificationHistoryItem( | ||
notificationId = responseItem.notificationId, | ||
userId = responseItem.userId, | ||
title = responseItem.title, | ||
content = responseItem.content, | ||
category = responseItem.category, | ||
isRead = responseItem.isRead, | ||
createdAt = responseItem.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
12 changes: 12 additions & 0 deletions
12
...src/main/java/org/sopt/official/data/model/notification/request/UpdatePushTokenRequest.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,12 @@ | ||
package org.sopt.official.data.model.notification.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class UpdatePushTokenRequest( | ||
@SerialName("platform") | ||
val platform: String, | ||
@SerialName("pushToken") | ||
val pushToken: String | ||
) |
24 changes: 24 additions & 0 deletions
24
...ain/java/org/sopt/official/data/model/notification/response/NotificationDetailResponse.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,24 @@ | ||
package org.sopt.official.data.model.notification.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class NotificationDetailResponse( | ||
@SerialName("notificationId") | ||
val notificationId: Long, | ||
@SerialName("userId") | ||
val userId: Int, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("content") | ||
val content: String?, | ||
@SerialName("deepLink") | ||
val deepLink: String?, | ||
@SerialName("webLink") | ||
val webLink: String?, | ||
@SerialName("createdAt") | ||
val createdAt: String, | ||
@SerialName("updatedAt") | ||
val updatedAt: String, | ||
) |
22 changes: 22 additions & 0 deletions
22
...ava/org/sopt/official/data/model/notification/response/NotificationHistoryItemResponse.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,22 @@ | ||
package org.sopt.official.data.model.notification.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class NotificationHistoryItemResponse( | ||
@SerialName("notificationId") | ||
val notificationId: Long, | ||
@SerialName("userId") | ||
val userId: Int, | ||
@SerialName("title") | ||
val title: String, | ||
@SerialName("content") | ||
val content: String?, | ||
@SerialName("category") | ||
val category: String, | ||
@SerialName("isRead") | ||
val isRead: Boolean, | ||
@SerialName("createdAt") | ||
val createdAt: String, | ||
) |
16 changes: 16 additions & 0 deletions
16
...va/org/sopt/official/data/model/notification/response/NotificationReadingStateResponse.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,16 @@ | ||
package org.sopt.official.data.model.notification.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class NotificationReadingStateResponse( | ||
@SerialName("id") | ||
val id: Int, | ||
@SerialName("isRead") | ||
val isRead: Boolean, | ||
@SerialName("createdAt") | ||
val createdAt: String, | ||
@SerialName("updatedAt") | ||
val updatedAt: String | ||
) |
14 changes: 14 additions & 0 deletions
14
...c/main/java/org/sopt/official/data/model/notification/response/UpdatePushTokenResponse.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 org.sopt.official.data.model.notification.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class UpdatePushTokenResponse( | ||
@SerialName("status") | ||
val status: Int, | ||
@SerialName("success") | ||
val success: Boolean, | ||
@SerialName("message") | ||
val message: String | ||
) |
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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/org/sopt/official/data/model/request/LogOutRequest.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,10 @@ | ||
package org.sopt.official.data.model.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class LogOutRequest( | ||
@SerialName("platform") val platform: String, | ||
@SerialName("pushToken") val pushToken: String | ||
) |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/org/sopt/official/data/model/response/LogOutResponse.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,12 @@ | ||
package org.sopt.official.data.model.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class LogOutResponse( | ||
@SerialName("success") | ||
val success: Boolean, | ||
@SerialName("message") | ||
val message: String | ||
) |
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.