I have a groups table and users table, and a many to many relationship between them.
In my app, there are different modules, like question, product,suggestion , etc.
Users can create products/questions/suggestions for a group. Each of the mentioned items belong to a group.
I want to implement a tagging system for these modules. A tag is created by a user, and is specific to only that group. (if group A creates a tag called 'disco', group B should not be able to search for it)
All of the above modules can have the same tag (I would also like to show all the modules when you search for a given tag)
How can I implement this ?