Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 639 Bytes

notes.md

File metadata and controls

53 lines (31 loc) · 639 Bytes

MODELS:

USER

  • has_many :weeks

  • has_many :days, through: :weeks

  • has_many :meals, through: :days

    Attrubutes:

    • name:
    • username:
    • password

WEEK

  • belongs_to :user

  • has_many :days

  • has_many :meals, through: :days

    Attrubutes:

    • notes:

DAY

  • belongs_to :week

  • has_many :meals

  • has_many :foods, through: :meals

    Attrubutes:

    • date: date
    • meal_type: string

MEAL

  • belongs_to :day

  • has_many :foods

    Attrubutes:

    • meal_type: string

FOOD

  • belongs_to :meal

    Attrubutes:

    • name: name