29 lines
709 B
Dart
29 lines
709 B
Dart
import 'package:aitrainer_app/model/evaluation_attribute.dart';
|
|
|
|
class Evaluation {
|
|
int? evaluationId;
|
|
late String name;
|
|
int? exerciseTypeId;
|
|
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();
|
|
}
|
|
}
|