Hey Ricardo,
I'm obviously not Nader, but what if you created two tables "users" and "userLikes"? When someone clicks the like button, you create a new "userLike" document where you have a liker and a likee field? You could then easily do lookups based on the liker and likee, especially if you added them as one to many relationships on the "user" document. This would be the basic relationships:
user {
admirers: [userLikes]
crushes: [userLikes]
}
userLikes {
liker: user
likee: user
isBlocked: boolean/string
}
You could add latitude/longitude and use the between that Nader mentions above and then use booleans for some of those other specifications such as blocked.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Ricardo,
I'm obviously not Nader, but what if you created two tables "users" and "userLikes"? When someone clicks the like button, you create a new "userLike" document where you have a liker and a likee field? You could then easily do lookups based on the liker and likee, especially if you added them as one to many relationships on the "user" document. This would be the basic relationships:
You could add latitude/longitude and use the
between
that Nader mentions above and then use booleans for some of those other specifications such as blocked.