-
Notifications
You must be signed in to change notification settings - Fork 2
Database Structure
Sebastian edited this page Feb 15, 2021
·
1 revision
- All images are stored at the root of the default bucket
- Use UUIDv4 as the name of the image (which will also be the ID of the image)
- This ID will later be sent as the payload of Firebase Cloud Messaging
- Or can use any other ID as long as it fits the requirement to be an ID
- The root node has 2 children:
assignments
andviolations
-
assignments
stores list of task-allocation related items (which security guard is assigned to which location) -
violations
stores list of violation items
-
The assignments
node is not in the scope of the project, it is there so that it is possible to simulate task allocation to the security guards.
Field | Type | Nullable? | Description |
---|---|---|---|
location | String |
✔️ | The location where the security guard is assigned to. |
user | String |
❌ | The uid of the security guard which is generated by Firebase Authentication. |
Gender is represented using an integer value of 0 or 1. 0 represents female while 1 represents the male.
Field | Type | Nullable? | Description |
---|---|---|---|
detectedGender | Gender |
❌ | The gender of the person entering the toilet. |
locationGender | Gender |
❌ | The gender allocated to the toilet. |
location | String |
❌ | The violation location. |
imageId | String |
❌ | The violation image id. This refers to the image name in the Firebase Storage. |
timestamp | Double |
❌ | The time of violation. |
isTrue | Boolean |
❌ | If this value is false and verifiedBy is not null, then the violation is a false positive. |
verifiedBy | String |
✔️ | The uid of the security guard that verifies the violation. When this value is not null and isTrue is true , then a violation is happening and the security guard should deal with the case immediately. |