I'm relatively new to Rails and I'm trying to figure out the ideal model structure for my application, which is a simple reminder service for home maintenance. The central model in the app is a Home.
Each home has many Appliance in it (i.e. a dishwasher, laundry, water heater etc).
Each Appliance has a set of reminders associated with it (i.e. if you have a water heater, you have to do XYZ every 3 months, and ABC every 6 months).
On a regular basis (monthly/weekly), there is a mailer sent to the homeowner with a list of all the reminders.
I'm trying to figure out the best model structure for this.
Right now, these are the models I have but I don't know if this is overkill or not?
- Home (Address, Postal Code, etc)
- Appliance (Name, Manufacturer)
- Reminder (Appliance_ID, Reminder, Frequency)
- HomeAppliance (Home_ID, Appliance_ID)
- HomeReminders (Home_ID, Reminder_ID)
The Associations:
- Home has_many HomeAppliances
- Appliance has_many Reminders
- Home has_many HomeReminders
Any help is appreciated.