I'm trying to get a handle on how to use custom Swift classes to model my Syncano backend. I have classes MPUser
and MPUserProfile
exactly as described in this guide. However, instead of adding an avatar field, I'd like to add a friends list. Should this property be:
- An array of MPUsers
- An array of MPUserProfiles
- An array of integers corresponding to the other users' IDs
- Something else?
Edit: their page on classes makes it sounds like I would want an array of type Reference (referring to users' IDs) but their arrays can only have string/int/boolean/float. I'm now wondering if an array of (non-Reference) integers will work fine.
Thank you for your help.