problem description
this kind of business is involved in the development. My idea is as follows: polymorphic association is used. This structure is particularly troublesome, relying on code implementation, and requires better solutions.
has a course table to enable users to book a single class hour.
has a course_packet that contains several class hours, and
a classroom table allocates a classroom for each class hour:
course table structure
id | name | user_id
course_ packet table structure
classroom