Skip to content

Instantly share code, notes, and snippets.

@karenxpn
Last active March 23, 2021 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karenxpn/a682cd02bb748d7a32e910e983332c2e to your computer and use it in GitHub Desktop.
Save karenxpn/a682cd02bb748d7a32e910e983332c2e to your computer and use it in GitHub Desktop.
Chat List that we should get
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