1

I am developing a car parking app in flutter, and I would like to change a bool value in a Firestore document at a specific time that can be found on a timestamp in another document. To be precise, The user will book a parking space and select an endtime(this would be the timestamp). After the booking process is successful, there is a bool value (inUse: false), the bool value is set to true so that the parking space is not shown on the app because its in use. However, at the endtime I would like to change the bool value to false to show that the parking space is now free.

This is what the document for the parking space looks like.

A screenshot of the parking space document

This below is what the document for the order looks like (where we can find the end timestamp).

A screenshot of the order document

So, I am looking for a cloud function or be able to create a scheduled job upon a successful booking to update the bool inUse to false at a set time defined by the end timestap that we can find in the order document.

DRUBOXM
  • 51
  • 3

0 Answers0