简体   繁体   中英

MySQL database design confusion | permissions

I'm doing a web application for personal purposes that will allow the users and organizations {org} to post {topics}. Web app purpose is to allow organizations to post research request for those who are interested for a prize, others can participate to win a prize.

Other users should be able to comment or post a comment(upload) (will be a pdf submission for a research contest)

Now, I'created this erd and database ERD进行初始测试

Now inside topics.php I've created tabs, [details, submission]

The submission = two stages stage one - upload research proposal pdf once rated by the owner > pass the id is saved in an array called pass

stage two = upload research final draft pdf for rating in this stage only those who passed should be able to post in this area, others watch only.

once a user clicks on submission tab, the user will be able to upload a file, once the topic owner allows him to go to the second stage, which is to upload final submission, the user can access another tab to submit final pdf

Now, I'm confused here, how am I going to store the id of those who are qualified to post final submission?

Any comments or guidance, please.

Off the top of my head, you'll probably want to create a topics_permissions table, which has a topic_id (referencing your topics table) and a user_id (from your users table); when the topic owner approves a user to upload a final submission, just add a row to the topics_permissions table.

Does that help?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM