toJson method
Implementation
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
data['date'] = date;
if (company != null) {
data['company'] = company!.toJson();
}
if (collector != null) {
data['collector'] = collector!.toJson();
}
if (machine != null) {
data['machine'] = machine!.toJson();
}
data['deleted'] = deleted;
data['sensor'] = sensor;
data['min'] = min;
data['max'] = max;
data['avg'] = avg;
if (datab != null) {
data['data'] = datab;
}
data['id'] = id;
return data;
}