I have created a webapp with php/mysql.
In my application I have different section, where user submits contents, like photos, news, stories, videos etc.
All these are separate sections with their separate story details pages. I want to apply a "Flag as Spam" functionality for all sections, but confused with database. Should I create separate table for every section such as table name: video_spam
or photo_spam
or should I go with one table spam_contents
which will contain following columns.
- SpamId - unique id for the table
- ByUserId - Who marked it as spam
- SectionName - will be 'news', 'video', 'stories' etc.
- Reason - Reason for which user marked it as spam
- ContentId - This will contain photoid or videoid or newsid
- Date - The day user marked content as spam.
If I need to fetch all content of video section, which is marked as spam by users then I can get it on the basis of SectionName
and ContentId
.
Will it be a good approach or anyone has any better solution for this scenario.
Please help, Thanks!