Closed shubh1777 closed 1 month ago
I created a Relationship collection in appwrite following this format
Collection: Relationship Attribute: followerId , followingId and createdAt
followerId: String, required. (References the user ID of the follower) followingId: String, required. (References the user ID of the user being followed) createdAt: Date, Default value NULL, required. ((References date user follow relationship)
the idea is to store userB that decided to follow userA
let assume that userA is the current user.
if userB where to follow userA userB-id will be store in followerId of userA .
and if userA where to follow userC , userC-id will be store in followingId of UserA.
this goes the same for every users
so presently,
userA followerId has { userB-id } and followingId has { userC-id }
while in userB followingId has { userA-id}
and userC followerId has { userA-id }
Hope that helps
Thanks. That helped a lot
Please explain the attributes of relationship collection of appwrite.