import 'exercise_type.dart'; class ExercisePlanDetailChange { static const String add = "add"; static const String delete = "delete"; static const String update = "update"; static const String deleted = "deleted"; static const String saved = "saved"; } class ExercisePlanDetail { int exercisePlanDetailId; int exercisePlanId; int exerciseTypeId; int serie; int repeats; String weightEquation; ExerciseType exerciseType; String change; // 1: update -1:delete 0: new ExercisePlanDetail(int exerciseTypeId) { this.exerciseTypeId = exerciseTypeId; } ExercisePlanDetail.fromJson(Map json) { this.exercisePlanDetailId = json['exercisePlanDetailId']; this.exercisePlanId = json['exercisePlanId']; this.exerciseTypeId = json['exerciseTypeId']; this.serie = json['serie']; this.repeats = json['repeats']; this.weightEquation = json['weightEquation']; } Map toJson() => { "exercisePlanId": exercisePlanId, "exerciseTypeId": exerciseTypeId, "serie": serie, "repeats": repeats, "weightEquation": weightEquation }; }