Closed shriram-joshi closed 4 years ago
I have completed this will close this issue with the next commit
I was thinking maybe the Name and Credentials POJOs aren't needed. I have structured the database like this, I don't think the nesting is necessary.. What do you think?
Yes sure. I'll re-structure it. Not a big deal. Just send me the structure for the vendor and customer and I'll change it accordingly to match the api.
I hope this is fine. Ignore the id field, mongodb automatically adds it.
Seems fine just make it in camel case. Like shopname should be shopName so that it matches the java object naming protocol. Because when you convert a Java object to a JsonObject it sets the keys according to the object name in the Pojo
Also the locality attribute for a Customer is not needed. Check the current Firestore key naming for reference.
Seems fine just make it in camel case. Like shopname should be shopName so that it matches the java object naming protocol. Because when you convert a Java object to a JsonObject it sets the keys according to the object name in the Pojo
Done.
Today I changed the model of Customer to match the db in my latest commit to mvvm-migration branch. This change includes creating 4 model pojo classes Customer.java, Address.java, Name.java and Credentials.java. These classes were made from http://www.jsonschema2pojo.org/ using the JsonObject string of a Customer from Firestore Database. Ideally we should also convert the Vendor class to fit the database model. This is more efficient as we dont need to create hashmaps to post data of users while registration/updating their details and makes the code for sign up more easy.