I'm trying to build an application which uses a database, that allows user to log in as an admin or employee.
Admin has few options:
- add new employee,
- list all employees and
- add TODO Items for selected employee
Employee
- display TODO items when logged in.
The first problem I've encountered is:
Should I create just one table for all records(employees & admins) and specify their name, username, password, status (admin or employee) or create separate tables for login credentials(username, password) and user data(like name, last name etc) to keep it separated?
Second problem is
I can't figure out how to display list of items for a user that has successfully logged in. How to access the data of the user that is logged in?