I have a simple global public transactions collection, similar to Ethereum/Etherscan.
/Transactions -> tx1
-> tx2
Tx document looks like this
{
timestamp,
from: username1,
to: username2,
amount
}
Now I would like to query all the Tx documents where username is equal to from OR to and order by timestamp.
Is this natively possible in Firestore?
If not do I have to create separate transaction collections for all the users along with the global one? And then do I need to add 3 documents - global, user1 and user2 transaction collections when user1 sends a transaction to user2 ?
Or is there a better approach?