|
|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
import 'package:test_sa/models/lookup.dart';
|
|
|
|
|
|
|
|
|
|
import '../fault_description.dart';
|
|
|
|
|
|
|
|
|
|
class SearchWorkOrder {
|
|
|
|
|
SearchWorkOrder({
|
|
|
|
|
this.id,
|
|
|
|
|
@ -63,7 +65,7 @@ class SearchWorkOrder {
|
|
|
|
|
calllastSituation = json['calllastSituation'] != null ? Lookup.fromJson(json['calllastSituation']) : null;
|
|
|
|
|
currentSituation = json['currentSituation'] != null ? Lookup.fromJson(json['currentSituation']) : null;
|
|
|
|
|
repairLocation = json['repairLocation'] != null ? Lookup.fromJson(json['repairLocation']) : null;
|
|
|
|
|
reason = json['reason'] != null ? Reason.fromJson(json['reason']) : null;
|
|
|
|
|
reason = json['reason'] != null ? Lookup.fromJson(json['reason']) : null;
|
|
|
|
|
startofWorkTime = json['startofWorkTime'];
|
|
|
|
|
endofWorkTime = json['endofWorkTime'];
|
|
|
|
|
workingHours = json['workingHours'];
|
|
|
|
|
@ -111,7 +113,7 @@ class SearchWorkOrder {
|
|
|
|
|
Lookup calllastSituation;
|
|
|
|
|
Lookup currentSituation;
|
|
|
|
|
Lookup repairLocation;
|
|
|
|
|
Reason reason;
|
|
|
|
|
Lookup reason;
|
|
|
|
|
String startofWorkTime;
|
|
|
|
|
String endofWorkTime;
|
|
|
|
|
num workingHours;
|
|
|
|
|
@ -144,7 +146,7 @@ class SearchWorkOrder {
|
|
|
|
|
Lookup calllastSituation,
|
|
|
|
|
Lookup currentSituation,
|
|
|
|
|
Lookup repairLocation,
|
|
|
|
|
Reason reason,
|
|
|
|
|
Lookup reason,
|
|
|
|
|
String startofWorkTime,
|
|
|
|
|
String endofWorkTime,
|
|
|
|
|
num workingHours,
|
|
|
|
|
@ -232,7 +234,7 @@ class SearchWorkOrder {
|
|
|
|
|
map['repairLocation'] = repairLocation.toMap();
|
|
|
|
|
}
|
|
|
|
|
if (reason != null) {
|
|
|
|
|
map['reason'] = reason.toJson();
|
|
|
|
|
map['reason'] = reason.toMap();
|
|
|
|
|
}
|
|
|
|
|
map['startofWorkTime'] = startofWorkTime;
|
|
|
|
|
map['endofWorkTime'] = endofWorkTime;
|
|
|
|
|
@ -1004,80 +1006,6 @@ class SparePart {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class FaultDescription {
|
|
|
|
|
FaultDescription({
|
|
|
|
|
this.id,
|
|
|
|
|
this.defectName,
|
|
|
|
|
this.workPerformed,
|
|
|
|
|
this.estimatedTime,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FaultDescription.fromJson(dynamic json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
defectName = json['defectName'];
|
|
|
|
|
workPerformed = json['workPerformed'];
|
|
|
|
|
estimatedTime = json['estimatedTime'];
|
|
|
|
|
}
|
|
|
|
|
num id;
|
|
|
|
|
String defectName;
|
|
|
|
|
String workPerformed;
|
|
|
|
|
String estimatedTime;
|
|
|
|
|
FaultDescription copyWith({
|
|
|
|
|
num id,
|
|
|
|
|
String defectName,
|
|
|
|
|
String workPerformed,
|
|
|
|
|
String estimatedTime,
|
|
|
|
|
}) =>
|
|
|
|
|
FaultDescription(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
defectName: defectName ?? this.defectName,
|
|
|
|
|
workPerformed: workPerformed ?? this.workPerformed,
|
|
|
|
|
estimatedTime: estimatedTime ?? this.estimatedTime,
|
|
|
|
|
);
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['id'] = id;
|
|
|
|
|
map['defectName'] = defectName;
|
|
|
|
|
map['workPerformed'] = workPerformed;
|
|
|
|
|
map['estimatedTime'] = estimatedTime;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Reason {
|
|
|
|
|
Reason({
|
|
|
|
|
this.id,
|
|
|
|
|
this.name,
|
|
|
|
|
this.value,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Reason.fromJson(dynamic json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
name = json['name'];
|
|
|
|
|
value = json['value'];
|
|
|
|
|
}
|
|
|
|
|
num id;
|
|
|
|
|
String name;
|
|
|
|
|
num value;
|
|
|
|
|
Reason copyWith({
|
|
|
|
|
num id,
|
|
|
|
|
String name,
|
|
|
|
|
num value,
|
|
|
|
|
}) =>
|
|
|
|
|
Reason(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
name: name ?? this.name,
|
|
|
|
|
value: value ?? this.value,
|
|
|
|
|
);
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['id'] = id;
|
|
|
|
|
map['name'] = name;
|
|
|
|
|
map['value'] = value;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ContactPersonWorkOrders {
|
|
|
|
|
ContactPersonWorkOrders({
|
|
|
|
|
this.id,
|
|
|
|
|
|