Skip to content

Estrutura do código

Yago Victor Marques de Souza edited this page Mar 26, 2022 · 2 revisions

Fluxograma de funcionamento

List4Me-Flowchart

Formatação de structs

Struct Task

struct Task: Codable {
    let done: Bool
    let deadline: String
    let title: String
    let id: Int
    let category: String
    let createdAt: String
}

Struct Activity

struct Activity: Codable {
    var context: String
    var tasks: [Task]
}

Modelagem do JSON

[
  {
    "context" : String(),
    "activities" : [
      {
        "category" : String(),
        "title" : String(),
        "done" : Bool(),
        "createdAt" : String(),
        "id" : Int(),
        "deadline" : String(),
      }
    ]
  }
]
Clone this wiki locally