class OffersUnreadChatModel {
  final int reqTotal;
  final List<OffersUnreadChatDataModel> reqChatUnread;

  OffersUnreadChatModel({
    required this.reqTotal,
    required this.reqChatUnread,
  });

  factory OffersUnreadChatModel.fromJson(Map<String, dynamic> json) {
    return OffersUnreadChatModel(
      reqTotal: json['total'],
      reqChatUnread: (json['reqChatCountData'] as List).map((e) => OffersUnreadChatDataModel.fromJson(e)).toList(),
    );
  }
}

class OffersUnreadChatDataModel {
  String reqTitle;
  int reqTotal;
  int requestID;
  String senderUserID;
  int unreadMessagesCount;
  String lastChatTime;
  String lastChatText;
  String customerName;

  OffersUnreadChatDataModel({
    required this.reqTitle,
    required this.reqTotal,
    required this.requestID,
    required this.senderUserID,
    required this.unreadMessagesCount,
    required this.lastChatTime,
    required this.lastChatText,
    required this.customerName,
  });

  factory OffersUnreadChatDataModel.fromJson(Map<String, dynamic> json) {
    return OffersUnreadChatDataModel(
      reqTitle: json['reqTitle'],
      reqTotal: json['reqTotal'],
      requestID: json['requestID'],
      senderUserID: json['senderUserID'],
      unreadMessagesCount: json['unreadMessagesCount'],
      lastChatTime: json['lastChatTime'],
      lastChatText: json['lastChatText'],
      customerName: json['customerName'],
    );
  }
}

// "reqTitle": "Spare_Parts / Ford  / Edge / 2016",
// I/flutter (16941): │         "reqTotal": 1,
// I/flutter (16941): │         "requestID": 145,
// I/flutter (16941): │         "senderUserID": "b56bc6bd-e45c-4644-b7c4-08dd02460895",
// I/flutter (16941): │         "unreadMessagesCount": 0,
// I/flutter (16941): │         "lastChatTime": "2025-02-12T10:33:42.1433333",
// I/flutter (16941): │         "lastChatText": "I am accepting this offer.",
// I/flutter (16941): │         "customerName": "Faiz 100"
