Skip to content

Instantly share code, notes, and snippets.

@trblackw
Created March 22, 2020 20:23
Show Gist options
  • Save trblackw/8ebf71033ea39626c7b2b03b09ba4126 to your computer and use it in GitHub Desktop.
Save trblackw/8ebf71033ea39626c7b2b03b09ba4126 to your computer and use it in GitHub Desktop.
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