I'm trying to create a planner for teachers, as a personal project, where the Users (teachers) can click on a day (in a calendar, that's been already created) leading to a page where they can add a Subject, Hours, Class. All of this, along with the User_id and Day should be updated in the database.
Is what I'm doing the most efficient way?
Also, how can I add multiple Timetable entries for each user in a database?
What I have tried:
The most efficient way I can think of is to have the following tables:
Hours
----------
start_time (datetime)
end_time (datetime)
Subject
----------
name (str)
Class
----------
name (str)
Timetable
----------
user_id
hours_id
subject_id
class_id
day