class LastMessage {
  final String? text;
  final String? audio;
  final bool writedByAdmin;
  final bool readed;

  const LastMessage({
    this.text,
    this.audio,
    required this.writedByAdmin,
    required this.readed,
  });

  factory LastMessage.fromJson(Map<String, dynamic> json) => LastMessage(
        text: json['text'],
        audio: json['audio'],
        writedByAdmin: json['writedByAdmin'],
        readed: json['readed'],
      );

  Map<String, dynamic> toJson() => {
        'text': text,
        'audio': audio,
        'writedByAdmin': writedByAdmin,
        'readed': readed,
      };
}
