Skip to content

Instantly share code, notes, and snippets.

@ggirotto
Created August 25, 2020 17:38
Show Gist options
  • Select an option

  • Save ggirotto/b19da6b44f5bc271a9c1e0c20fa7f7b3 to your computer and use it in GitHub Desktop.

Select an option

Save ggirotto/b19da6b44f5bc271a9c1e0c20fa7f7b3 to your computer and use it in GitHub Desktop.

Revisions

  1. ggirotto created this gist Aug 25, 2020.
    15 changes: 15 additions & 0 deletions School.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    struct School: CKCodable {
    var cloudKitRecordType: String {
    return "School"
    }
    var cloudKitIdentifier: String {
    return id
    }

    var id = UUID().uuidString
    var name: String!
    var location: CLLocation!
    var students: [Person]!
    var director: Person!
    var books: [Book]!
    }