开发者

pending data approval

I have a website that allows users with accounts. Account profiles are displayed on the front end of a website. Users can login and update their data, but it all must be approved by an admin (on a form) before the front end content reflects their update. The "live" data is stored across multiple tables in a Postgresql DB.

I'm looking for ideas for the (best / easiest) way to handle storing (db schema) this updated data that will allow an admin user to

  1. approve/deny updates independently for a user (approve update A, deny update B, and ignore update C)
  2. Be easy to maintain
  3. Be easy for me to pull the updates to show admin and then process each individual field request.

Admin will need to be able to see a list of all users that have pending updates and then be able to see which fields for a specific user was updated so they can approve/deny the request.

Users can freely update a field as many times as they want, but admin will always see the current field content and the last update the user made.

I don't need to be able to see exact differences (although brownie points if you know how). They really just need to be able to see the two fields

ie:

   Current          Up开发者_JAVA百科date
+--------------+-------------+-------------+
|              |             | (o) Approve |
| description  | Description |             |
|              |             | (o) Deny    |
+--------------+-------------+-------------+
|              |             | (o) Approve |
| title        | Title       |             |
|              |             | (o) Deny    |
+--------------+-------------+-------------+
|                 [Submit]                 |
+------------------------------------------+

I'm open to any and all ideas, DB techniques, programming, or something else I haven't thought of.

Thanks in advance!


It's just a status of a record, an extra column in your tables holding the current status will be enough.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜