import 'package:freezed_annotation/freezed_annotation.dart';
import 'workout_set.dart';

part 'exercise.freezed.dart';
part 'exercise.g.dart';

@freezed
abstract class Exercise with _$Exercise {
  const factory Exercise({
    required String exerciseId,
    required String exerciseName,
    @Default(0.0) double bodyweightAtSession,
    @Default([]) List<WorkoutSet> sets,
    int? intervalSeconds,
  }) = _Exercise;

  factory Exercise.fromJson(Map<String, dynamic> json) =>
      _$ExerciseFromJson(json);
}
