0

I am working on two smart contracts Users and Groups. The relation is one user can have many groups. Can I have such a relation in these smart contracts? After smart contract deployment and data insertion in multiindex table, I will get table data using eos-sharp API and save it in MongoDB. So, if we imagine to save users and groups data, the MongoDB data structure will be like this,

{
   "_id":ObjectId("52ffc33cd85242f436000001"),
   "contact": "987654321",
   "dob": "01-01-1991",
   "name": "Tom Benzamin",
   "group_ids": [
      ObjectId("52ffc4a5d85242602e000000"),
      ObjectId("52ffc4a5d85242602e000001")
   ]
}  

Here this user belongs to two groups. But if I want to insert users and groups data together from smart contracts. How it will be? Can I give and check the relationship between these two smart contracts?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.