31 lines
696 B
Dart
31 lines
696 B
Dart
class MentionData {
|
|
int id;
|
|
String fullName;
|
|
String text;
|
|
String createdAt;
|
|
List<String> mentions;
|
|
|
|
MentionData(
|
|
{required this.id,
|
|
required this.text,
|
|
required this.createdAt,
|
|
required this.fullName,
|
|
required this.mentions});
|
|
|
|
factory MentionData.fromJson(Map<String, dynamic> json) => MentionData(
|
|
id: json['id'],
|
|
text: json['text'],
|
|
createdAt: json['createdAt'],
|
|
fullName: json['fullName'],
|
|
mentions: json['mentions'],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'id': id,
|
|
'text': text,
|
|
'createdAt': createdAt,
|
|
'fullName': fullName,
|
|
'mentions': mentions,
|
|
};
|
|
}
|