User attributes specific to groups

Hello,

I could not find anywhere how to give a user an attribute whose value would be specific to a group. For example : a role within the group, a “pending invitation” status, etc. that my backend could then work with.

Is this even possible, or should I make an external table in my database, mapping user ids with group ids and adding the other attributes ?

Have a great day !

Antoine