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;
  }
}
