You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
767 B
Dart
34 lines
767 B
Dart
|
3 years ago
|
|
||
|
|
import '../lookup.dart';
|
||
|
3 years ago
|
|
||
|
|
class PPMCheckList{
|
||
|
3 years ago
|
Lookup? status;
|
||
|
|
String? title;
|
||
|
|
String? comment;
|
||
|
|
String? measuredValue;
|
||
|
3 years ago
|
|
||
|
|
PPMCheckList({
|
||
|
|
this.title,
|
||
|
|
this.status,
|
||
|
|
this.comment,
|
||
|
|
this.measuredValue,
|
||
|
|
});
|
||
|
|
|
||
|
|
Map<String, String> toMap() {
|
||
|
|
return {
|
||
|
3 years ago
|
if(status != null) 'status': status!.id.toString(),
|
||
|
|
if(title != null) 'title': title!,
|
||
|
|
if(comment != null) 'comment': comment!,
|
||
|
|
if(measuredValue != null) 'measuredValue': measuredValue!,
|
||
|
3 years ago
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
factory PPMCheckList.fromMap(Map<String, dynamic> map) {
|
||
|
|
return PPMCheckList(
|
||
|
|
status: Lookup.fromJson(map['status']),
|
||
|
|
title: map['title'] as String,
|
||
|
|
comment: map['comment'] as String,
|
||
|
|
measuredValue: map['measuredValue'] as String,
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|