-
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.
refactor(application): notification event 추상화 작업 및 event publisher 메소…
…드 네이밍 변경
- Loading branch information
Showing
5 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
23 changes: 13 additions & 10 deletions
23
...fication-application/src/main/kotlin/gloddy/notification/event/NotificationCreateEvent.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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
package gloddy.notification.event | ||
|
||
import gloddy.notification.Notification | ||
import gloddy.notification.NotificationType | ||
import gloddy.notification.UserId | ||
|
||
class NotificationCreateNotificationEvent( | ||
val notification: Notification | ||
) : NotificationEvent | ||
fun Notification.toNotificationCreateEvent(): NotificationCreateEvent = | ||
NotificationCreateEvent( | ||
userId = this.userId, | ||
redirectId = this.redirectId, | ||
type = this.type | ||
) | ||
|
||
//fun Notification.toEntity(): NotificationPushEvent = | ||
// NotificationPushEvent( | ||
// userId = this.userId, | ||
// content = this.content, | ||
// type = this.type, | ||
// redirectId = this.redirectId | ||
// ) | ||
class NotificationCreateEvent( | ||
val userId: UserId, | ||
val redirectId: Long, | ||
val type: NotificationType | ||
) : NotificationEvent |
4 changes: 4 additions & 0 deletions
4
notification-application/src/main/kotlin/gloddy/notification/event/NotificationEvent.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,4 @@ | ||
package gloddy.notification.event | ||
|
||
interface NotificationEvent { | ||
} |
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