Last active
March 23, 2021 23:17
-
-
Save karenxpn/a682cd02bb748d7a32e910e983332c2e to your computer and use it in GitHub Desktop.
Chat List that we should get
This file contains hidden or 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
import Foundation | |
struct ChatListModel: Codable { | |
var chats: [ChatModel] | |
} | |
struct ChatModel: Identifiable, Codable { | |
var id: Int | |
var chatName: String | |
var image: String | |
var message: ChatPreveiwMessage? | |
var read: Bool | |
} | |
struct ChatPreveiwMessage: Codable { | |
var content: String | |
var created_at: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment