Skip to content

Instantly share code, notes, and snippets.

@amosgyamfi
Created April 23, 2022 12:54
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 amosgyamfi/bd2f3999765f937a2f88a05c8e965425 to your computer and use it in GitHub Desktop.
Save amosgyamfi/bd2f3999765f937a2f88a05c8e965425 to your computer and use it in GitHub Desktop.
import Foundation
// Data structure
struct MessagesStructure: Identifiable { // Identifiable protocol - makes it possible to use value types that needs to have a stable notion of identity.
var id = UUID() // A universally unique identifier to identify a particular datafield and types
var unreadIndicator: String
var avatar: String
var name: String
var messageSummary: String
var timestamp: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment