2023-12-29 12:16:30 +00:00
|
|
|
class DiaryEntry < ApplicationRecord
|
|
|
|
belongs_to :user
|
2023-12-29 12:17:57 +00:00
|
|
|
has_many :exercises
|
2023-12-29 12:16:30 +00:00
|
|
|
|
|
|
|
validates :date,
|
|
|
|
:pain_level,
|
|
|
|
:energy_level,
|
|
|
|
:mental_alertness_level,
|
|
|
|
:work_stress_level,
|
|
|
|
:life_stress_level,
|
2023-12-29 14:27:09 +00:00
|
|
|
:sleep_quality_level,
|
2023-12-29 12:16:30 +00:00
|
|
|
presence: true
|
|
|
|
end
|