{"size": 647, "ext": "js", "max_stars_repo_path": "models/Workout.js", "max_stars_repo_name": "wyoung60/fitnessTracker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/Workout.js", "max_issues_repo_name": "wyoung60/fitnessTracker", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/Workout.js", "max_forks_repo_name": "wyoung60/fitnessTracker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.5897435897, "max_line_length": 57, "alphanum_fraction": 0.5054095827}
//Dependency
const mongoose = require("mongoose");

//Schema for workout
const WorkoutSchema = new mongoose.Schema({
  day: { type: Date, default: Date.now },
  exercises: [
    {
      type: {
        type: String,
      },
      name: {
        type: String,
      },
      duration: {
        type: Number,
      },
      weight: {
        type: Number,
      },
      reps: {
        type: Number,
      },
      sets: {
        type: Number,
      },
      distance: {
        type: Number,
      },
    },
  ],
});

//Create mongoose model
const Workout = mongoose.model("Workout", WorkoutSchema);

//Exports model
module.exports = Workout;
