As I understand it, when the APK is installed for the first time, the initializer looks for the label ID in TinyDB, and if the value does not exist, it considers it to be 1. This way, it then calls the Label ID in the FireBase. The value found in ID, is added +1 and stored in TinyDB with the label ID. Then a new Firebase ID is recorded again with the new Firebase ID that will be stored.
My question is, is this ID then generated in TinyDB unique?
This way every time the person places a new order, if using a Delivery, will this ID always be the order reference?
If YES, then we should never delete the TinyDB ID label that was generated on the first access of the apk.
I was doing it wrong, and with every completed order, I was deleted the TinyDB ID label. In this way always creating a new ID.
I would like you to comment on this topic.
My question is whether it is correct or not to delete this ID on TinyDB with each request for a new order?
Or if that ID created at the first access to the APK, is unique and should always be stored in a tinyDb?
The logic of your system is up to you. If you want the order to be identified only by the customer ID, do so. But, in this way, there is a big problem of not having a reference on which client X’s order happened or when it was dispatched …