Multi-level confirmation process

database-design

My problem:

I'm designing a system, that will have multiple administrators with different administrator levels (level 1,2, …). When a user logs in and creates something (eg. organisation), all of the administrators need to confirm what the user created. The administrator with administrator level 1 is the first one to confirm. If he accepts the users data he will pass the decision to administrator with administrator level 2. He will the again decide if the user data is correct or not. This process goes on until the administrator with the highest administrator level is reached.

My proposed solution:

Every administrator would have a column that indicates his administrator level. User data table would then have a confirmation status column and a column, indicating which administrator level was the last one to set the confirmation status.

What do you think?

Best Answer

Consider Confirmationas a separate entity which stores info on what admin confirmed that user action and when it happened. Status of user (action?) is derived as the confirmation with the max level of admin. One option I would add is a requried confiration level attribute of user, ie. when admin with required level confirms user, the confirmation process is considered finished successfully. Probably in some future moment more levels will be added to the system and new levels probably should not render old users unconfirmed.