Created
March 22, 2020 20:23
-
-
Save trblackw/8ebf71033ea39626c7b2b03b09ba4126 to your computer and use it in GitHub Desktop.
This file contains 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
import firebase from 'firebase/app'; | |
import FirebaseApp from '../index'; | |
import { Firestore } from 'firebaseTypes'; | |
export enum Collections { | |
USERS = 'users' | |
} | |
export default class FirebaseModel { | |
public store: Firestore; | |
constructor(store: Firestore | null) { | |
this.store = store ?? FirebaseApp.firestore(); | |
} | |
public static get userCollection() { | |
return Collections.USERS | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment