Skip to content

Instantly share code, notes, and snippets.

@lakshyabatman
Created October 17, 2020 21:21
Show Gist options
  • Save lakshyabatman/b1161f7cf8dacbe01d5bcb7b46563ada to your computer and use it in GitHub Desktop.
Save lakshyabatman/b1161f7cf8dacbe01d5bcb7b46563ada to your computer and use it in GitHub Desktop.
User repository class
class UserRepository {
constructor() {
this.userModel = userModel;
}
getOne(id: String) {
// ..db calls!!
}
getAll() : UserEntity {
// ...db calls!!
//Map user document to UserEntity
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment