Class Invariants V3 - CBTYoung/Documentation GitHub Wiki

Active Fill

  • Event is not empty.
  • Has list of emotions.
  • Has body part selection.
  • Has a thought.
  • Has a response.

User

  • Has a username.
  • Has list of achievements.
  • Can have a draft.
  • Has a list of reports.

Automatic Thoughts

  • Thought is not empty.

Achievements

  • Has reward for login and is atleast 1.
  • Has reward for login in a row and is atleast 1.
  • Has reward for filling report.
  • Has reward for filling report in a row.
  • Has last time login.
  • Has streak login.
  • Has last time fill report.
  • Has streak fill report.

Scheduled notifications

  • Message is not empty
  • Notification is sent later than right now.
  • Notification can repeat every week.

Therapist

  • username is not empty.
  • password is not empty.
  • Has list of patients.

Camera

  • Has an image.

Body Part Selection

  • Has body part list.

Automatic Thoughts Response

  • thought_response is not empty.
  • Has map of responses.

Module

  • Has event date.
  • Has creation date.
  • Has index.

Report Controller

  • Has map of reports.
  • Has map of reports by month.

Patient

  • Has a first name.
  • Has a last name.
  • Has a non empty password.
  • Holds controller for automatic thoughts.

Report Controller

  • Has map of reports.
  • Has map of reports by month.