I would like to build (or find) a php reporting library that I can use to allow my users to report any type of content as bad. Actually, if they could report content as good (which I guess would mean a rating system) that would be even better. So if anyone knows of a library like this I would love to hear about it.
Anyway, this is how I imagine the database working and I would like to know if this sounds correct.
- ID - ID of row
- USER_ID - ID of the user voting/reporting
- ITEM_ID - UNIQUE table row ID of the item reported (post, other user, link, etc...)
- TYPE - the name of the table this pertains to (posts, users, links, etc...)
- DATE - datetime of report
- VALUE - I guess this could be an UP vote or DOWN vote
By including the [TYPE] column I can use this voting system across all content types on my site instead of just one (like forum posts). By storing the user_id I can be sure that only one vote/report is cast per item per user. Does anyone have anything to add to this idea?