I have a User database table that has the following fields,
Id
Username
Password
Status_id
A status table consists of just an Id and title field, that has values of Pending, On Hold, Active and Completed.
When the status is changed to Pending, I want to record in a separate table the id of the admin who changed the user to this status, date_changed(datetime) and the reason(text) for them being pending.
When On Hold, I want to know the reason(text) why, the date / time they went on hold and the time they will become off hold.
For Completed I’d like to know the final_grade(int) they got, any comments(text) and filename of an attached file.
This causes me a headache due to the many status types and i’m wondering what database design is best to suit for this?
I’m using a PHP Form to change the status value if anyone is wondering, then i’d input the values appropriate dependant on the chosen value.
Thanks
In the end, I used Doctrine Inheritance mapping which solved my problem