I'm working on adding user submitted comments to a personal project.
Comments have a number of flags for special purposes. Comments are also versioned for moderation purposes so timestamps aren't need on specific fields.
These are the options I have so far in the functional design. (list not final) This list will change at some point because I know I haven't figured out everything.
- Wrapped (The text is hidden behind a javascript link)
- Hidden (The text of comment is hidden from non-moderators)
- Locked (Can't be edited)
- Deleted (Comment deleted)
- Moderator (hides the name of the poster)
- Administrator (same as moderator except moderators can't edit)
- Hellbanned (Acts deleted except for the poster)
There are some rules governing what flags can exist together. (As far as display is concerned.)
- Administrator/Moderator comments shouldn't be wrapped, hidden, locked, or hellbanned. (Moderators can't be hellbanned)
- A comment can't be an Administrator and a Moderator comment at the same time.
- Hellbanned shouldn't have Deleted.
- A comment cannot have both Wrapped and Hidden
- Hidden comments should be Locked.
Are boolean flags enough to implement this in a database? (I'm using Ruby on Rails with SQLite/MySQL so the database can't have triggers/constraints)