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.
cloudsolutions-atoms/lib/modules/internal_audit_module/models/engineer_data_model.dart

53 lines
1.4 KiB
Dart

2 months ago
import 'package:test_sa/modules/internal_audit_module/models/internal_audit_attachment_model.dart';
class EngineerData {
int? id;
String? debrief;
String? startTime;
String? endTime;
double? totalHours;
bool? isComplete;
int? statusId;
int? requestId;
List<InternalAuditAttachments>? attachments;
EngineerData({
this.id,
this.debrief,
this.startTime,
this.endTime,
this.totalHours,
this.isComplete,
this.statusId,
this.requestId,
this.attachments,
});
EngineerData.fromJson(Map<String, dynamic> json) {
id = json['id'];
debrief = json['debrief'];
startTime = json['startTime'];
endTime = json['endTime'];
totalHours = (json['totalHours'] as num?)?.toDouble();
isComplete = json['isComplete'];
statusId = json['statusId'];
requestId = json['requestId'];
attachments = json['attachments'] != null ? (json['attachments'] as List).map((e) => InternalAuditAttachments.fromJson(e)).toList() : [];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = {};
data['id'] = id;
data['debrief'] = debrief;
data['startTime'] = startTime;
data['endTime'] = endTime;
data['totalHours'] = totalHours;
data['isComplete'] = isComplete;
data['statusId'] = statusId;
data['requestId'] = requestId;
if (attachments != null) {
data['attachments'] = attachments!.map((e) => e.toJson()).toList();
}
return data;
}
}