Home>

Development of an app that can manage the remaining number of prescribed medicines and has a reminder function at the time of administration.
I would like to implement a reminder function on the list page where the number of doses taken per day can be managed on the calendar and the remaining number can be managed.
・ User information
・ New drug information
・ Notification time information
I would like to know if these tables work properly.
Also, if it is different, please let us know the changes.
Thank you.

DB design users table (user information)

Column Type Options
name string null: false
email string null: false
password integer null: false

Association

has_many: notices
has_many: medicines

medicines table (new drug information)

Column Type Options
medicine_name string null: false
all_tablets integer null: false
1day_tablet integer null: false
timezone_id integer null: false
memo text
user_id integer null: false, foreign_key: true

Association

belongs_to: user
has_many: notices

notices table (notification function)

Column Type Options
start_date date null: false
end_date date null: false
dosing_time time null: false
user_id integer null: false, foreign_key: true
user_id integer null: false, foreign_key: true

Association

belongs_to: medicine
belongs_to: user

Corresponding source code What I tried Supplementary information (FW/tool version, etc.)