Skip to content

Instantly share code, notes, and snippets.

@AhmedMenaim
Created May 18, 2021 16:20
Show Gist options
  • Save AhmedMenaim/14804cc242a62d4847a2d2b641e71087 to your computer and use it in GitHub Desktop.
Save AhmedMenaim/14804cc242a62d4847a2d2b641e71087 to your computer and use it in GitHub Desktop.
import Foundation
import Firebase
enum FBCollectionReferences :String {
case Category
case Item
case Cart
case User
}
func getFBCollectionReference (collectionRefrence: FBCollectionReferences) -> CollectionReference {
return Firestore.firestore().collection(collectionRefrence.rawValue)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment