Skip to content

Instantly share code, notes, and snippets.

@michzio
Created December 12, 2021 13:37
Show Gist options
  • Save michzio/b6822e5c7e21da94eb3727c0408c260f to your computer and use it in GitHub Desktop.
Save michzio/b6822e5c7e21da94eb3727c0408c260f to your computer and use it in GitHub Desktop.
SwiftUI MVVM architecture - DTO
struct WordsetCategoryDTO: Codable {
let categoryId: String
let foreignName: String
let nativeName: String
var image: String?
enum CodingKeys: String, CodingKey {
case categoryId = "cid"
case foreignName = "foreignName"
case nativeName = "nativeName"
case image
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment