29 lines
722 B
Dart
29 lines
722 B
Dart
import 'package:intl/intl.dart';
|
|
|
|
class Exercise {
|
|
int exerciseId;
|
|
int exerciseTypeId;
|
|
int customerId;
|
|
int quantity;
|
|
DateTime datetimeExercise;
|
|
|
|
|
|
|
|
Exercise({this.exerciseTypeId, this.customerId, this.quantity, this.datetimeExercise});
|
|
|
|
Exercise.fromJson(Map json) {
|
|
this.exerciseTypeId = json['exerciseTypeId'];
|
|
this.customerId = json['customerId'];
|
|
this.quantity = json['quantity'];
|
|
this.datetimeExercise = json['datetimeExercise'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() =>
|
|
{
|
|
"exerciseTypeId": exerciseTypeId,
|
|
"customerId": customerId,
|
|
"quantity": quantity,
|
|
|
|
"datetimeExercise": DateFormat('yyyy-MM-dd HH:mm:ss').format(this.datetimeExercise),
|
|
};
|
|
} |