So i have this Transaction database where i store the UID of Client, Worker, and PushID of the job, and when the worker take a job, worker supposed to get data about client Name from ClientID along with every data stored inside the JobID, while Client get data about Worker name from WorkerID along with every data in the same JobID, how do i achieve this ?
{
"Transaction" : {
"-M9yM-F8F6pPJEqSVFhm" : {
"ClientID" : "rFKXOXIp2HQWbLGBjSENdzGq4lq2",
"JobID" : "-M9tDcM4NHpZCzCftxo4",
"WorkerID" : "HFaZtI241mfziA6pkHycw2DTOYh2"
}
},
"description" : {
"-M9tDcM4NHpZCzCftxo4" : {
"Address" : "123asdasda",
"ClientID" : "rFKXOXIp2HQWbLGBjSENdzGq4lq2",
"JobID" : "-M9tDcM4NHpZCzCftxo4",
"RoomSize" : "Large (luas diatas 16M)",
"Service1" : "Cleaning",
"Service2" : "Room Organizing",
"Service3" : "Bathroom Cleaning",
"Service4" : "Organizing Laundry",
"eHour" : "12",
"eMin" : "00",
"sHour" : "11",
"sMin" : "00"
}
},
"userdesc" : {
"HFaZtI241mfziA6pkHycw2DTOYh2" : {
"email" : "testing123@gmail.com",
"id" : "2545878096555",
"name" : "Test123",
"pass" : "blablabla",
"phone" : "08000000000"
},
"rFKXOXIp2HQWbLGBjSENdzGq4lq2" : {
"email" : "eaglejason13@gmail.com",
"id" : "125565896587452",
"name" : "Jason Chrislie",
"pass" : "123456789",
"phone" : "087883592045"
}
}
}