import { Exercise } from './exercise.model';

export class TrainingWorkout {
    id:                        number;
    box_id:                    number;
    name:                      string;
    description:               string;
    category:                  string;
    created_at:                Date;
    updated_at:                Date;
    training_workout_sections: TrainingWorkoutSection[];
}

export class TrainingWorkoutSection {
    id:                       number;
    training_workout_id:      number;
    description:              string;
    seconds:                  number;
    rounds:                   string;
    type:                     string = "AMRAP";
    custom_score:             number = 0;
    custom_score_explanation: string;
    created_at:               Date;
    updated_at:               Date;
    lines:                    TrainingWorkoutLine[];
}

export class TrainingWorkoutLine {
    id:                          number;
    training_workout_section_id: number;
    description:                 string;
    exercise_id:                 number;
    exercise:                    Exercise;
    seconds:                     number;
    reps:                        string;
    maleVal:                     number;
    femaleVal:                   number;
    units:                       string;
    exercise_scaled_id:          number;
    exercise_scaled:             Exercise;
    seconds_scaled:              number;
    reps_scaled:                 string;
    maleVal_scaled:              number;
    femaleVal_scaled:            number;
    units_scaled:                string;
    created_at:                  Date;
    updated_at:                  Date;
}

export class TrainingType {
    id:          number;
    name:        string;
    description: string;
    slug:        string;
    created_at:  Date;
    updated_at:  Date;
}
