feat(chat-room) 채팅방 API

- 채팅방 입장 API 연동
- 채팅 쿼터가 없을 때 표시할 UI 추가
This commit is contained in:
Yu Sung
2025-09-04 04:20:45 +09:00
parent 96cabbc6a7
commit 2576c851ee
9 changed files with 353 additions and 47 deletions

View File

@@ -5,7 +5,7 @@
// Created by klaus on 9/2/25.
//
struct ServerChatMessage: Decodable {
struct ServerChatMessage: Decodable, Comparable {
let messageId: Int64
let message: String
let profileImageUrl: String
@@ -15,4 +15,12 @@ struct ServerChatMessage: Decodable {
let imageUrl: String?
let price: Int?
let hasAccess: Bool
static func < (lhs: ServerChatMessage, rhs: ServerChatMessage) -> Bool {
if lhs.createdAt == rhs.createdAt {
return lhs.messageId < rhs.messageId
} else {
return lhs.createdAt < rhs.createdAt
}
}
}