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/asset_delivery_module/models/history_model.dart

35 lines
991 B
Dart

import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/models/new_models/work_order_detail_model.dart';
class AssetDeliveryHistoryModel {
WorkOrderAssignedEmployee? user;
Lookup? status;
DateTime? createdDate;
String ?timeDifference;
AssetDeliveryHistoryModel({
this.user,
this.status,
this.createdDate,
this.timeDifference,
});
AssetDeliveryHistoryModel.fromJson(Map<String, dynamic> json) {
user = json['user'] != null ? WorkOrderAssignedEmployee.fromJson(json['user']) : null;
status = json['status'] != null ? Lookup.fromJson(json['status']) : null;
createdDate = json['createdDate'] != null ? DateTime.tryParse(json['createdDate']) : null;
timeDifference = '';
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (user != null) {
data['user'] = user!.toJson();
}
if (status != null) {
data['status'] = status!.toJson();
}
return data;
}
}