Skip to content

Commit

Permalink
feat/#110 :: 새로운 유저 알림을 위한 모델 수정
Browse files Browse the repository at this point in the history
Co-Authored-By: Youngkyu Song <[email protected]>
  • Loading branch information
Kiyoung-Kim-57 and youn9k committed Nov 26, 2024
1 parent 2f25021 commit 4afb7ba
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ struct RoomResponseDTO: WebSocketResponsable {
enum RoomMessageType: String, Decodable {
case createRoom
case joinRoom
case notifyNewUser
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Foundation
import PhotoGetherDomainInterface

public struct NotifyNewUserMessage: Decodable {
public let newUser: UserDTO

public init(newUser: UserDTO) {
self.newUser = newUser
}

public func toEntity() -> NotifyNewUserEntity {
NotifyNewUserEntity(newUser: self.newUser.toEntity())
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Foundation

public struct NotifyNewUserEntity {
public let newUser: UserEntity

public init(newUser: UserEntity) {
self.newUser = newUser
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package struct JoinRoomResponseDTO: Encodable {
let userID: String
let users: [UserDTO]
let userList: [UserDTO]

package init(userID: String, users: [UserDTO]) {
package init(userID: String, userList: [UserDTO]) {
self.userID = userID
self.users = users
self.userList = userList
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Foundation

package struct NotifyNewUserResponseDTO: Encodable {
let newUser: UserDTO

package init(newUser: UserDTO) {
self.newUser = newUser
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ struct RoomResponseDTO: Encodable {
enum RoomMessageType: String, Encodable {
case createRoom
case joinRoom
case notifyNewUser
}
}

0 comments on commit 4afb7ba

Please sign in to comment.