About user list display

I'm having trouble displaying a list of users.

As a premise, Authenticated user, userA, contentsZ exists.

Includes a follow function for users and a like function for content.

Authenticated user is following userA.

userA liked contentsZ.

I would like to display a list of users (userA) who liked content when opening content Z, and further filter it with users that I follow.

But I don't know how. Please give me a solution, whether it's list display or database structure.

1
2 replies