Last active
October 4, 2017 18:48
-
-
Save ts95/d05d2551d800b5b2bb3cd67bb905772c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let book = FirestoreBook( | |
isbn: "95-0443-843-0", | |
title: "Do Androids Dream of Electric Sheep?", | |
authors: ["Philip K. Dick"], | |
year: 1968, | |
country: "United States", | |
createdAt: Date(), | |
format: .ebook, | |
award: nil) | |
let firestore = Firestore.firestore() | |
let ref = firestore.collection("books").document(book.documentID) | |
ref.setModel(book) // as opposed to using .setData([:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment