import 'dart:convert'; import '../users.dart'; NotificationModel notificationFromJson(String str) => NotificationModel.fromJson(json.decode(str)); class NotificationModel { String? action; ChatModel? chat; String? content; int? id; users? receiver; users? sender; String? status; String? subject; int? timestamp; int? actionId; NotificationModel.fromJson(Map json) { action = json['action']; actionId = json['actionId']; chat = json['chat'] != null ? ChatModel.fromJson(json['chat']) : null; content = json['content']; id = json['id']; receiver = json['reciver'] != null ? users.fromJson(json['reciver']) : null; sender = json['sender'] != null ? users.fromJson(json['sender']) : null; status = json['status']; subject = json['subject']; timestamp = json['timestmp']; } } class ChatModel { String? chatId; String? content; int? id; users? recipient; String? recipientName; users? sender; String? senderName; String? status; int? timestamp; ChatModel.fromJson(Map json) { chatId = json['chatId']; content = json['content']; id = json['id']; recipient = json['recipient'] != null ? users.fromJson(json['recipient']) : null; recipientName = json['recipientName']; sender = json['sender'] != null ? users.fromJson(json['sender']) : null; senderName = json['senderName']; status = json['status']; timestamp = json['timestamp']; } }