import 'package:aitrainer_app/model/evaluation_attribute.dart';

class Evaluation {
  late int evaluationId;
  late String name;
  late int exerciseTypeId;
  late String unit;
  late List attributes;

  Evaluation.fromJson(Map json) {
    evaluationId = json['evaluationId'];
    name = json['name'];
    exerciseTypeId = json['exerciseTypeId'];
    unit = json['unit'];
    this.attributes = json['attributes'].map((attr) => EvaluationAttribute.fromJson(attr)).toList();
  }

  @override
  String toString() {
    Map<String, dynamic> json = {
      'evaluationId': this.evaluationId,
      'name': this.name,
      'exerciseTypeId': this.exerciseTypeId,
      'unit': this.unit
    };
    return json.toString();
  }
}
