Skip to content

Add training sessions #26

@shamblid

Description

@shamblid

When a user completes a habit, add a row to it indicating a new training session.

This is the training session schema for the internal app.

const trainingSession = {
  user_id: ... // primary key
  item_id: `training_session-${uuidv4()}`, // sort . key
  trainingType: 'external', // this is always 'external'
  trainedFor: 3600 // integer in seconds
  topic: 'name of habit', // name of the session should probably just be the name of the habit
  sourceApplication: 'habit-loop', // this should always be habit-loop
  rating: 5 // integer from 1-5
  links: ["https://google.com"] // array of urls
}

A new method in dynamo should be created under the user model for now. When a user completes a habit call this dynamo method.

There will be a separate issue for the front-end portion but know that we may have to add some additional information to habit creation to get some of the information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions