-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add firestore timestamps to entities #317
Comments
Oh, just took a look at the PRs and looks like the repo is not maintained anymore :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the firestore admin sdk, we can retrieve the timestamps (createTime, updateTime, readTime) of a document.
This can be helpful when we are using firestore for backend applications and don't want to manually create timestamps
Documentation: https://firebase.google.com/docs/reference/functions/test/test.firestore.DocumentSnapshotOptions
Proposal - Include the types to the entity IF a property with the same name does not exist (user could override this value):
Usage:
For typescript, we can add a
Timestamped
wrapper to add some typing to the entity, so anyone could use it as:Does it make sense?
The text was updated successfully, but these errors were encountered: