32 lines
746 B
Dart
32 lines
746 B
Dart
class MentionData {
|
|
final int id;
|
|
final String fullName;
|
|
final String text;
|
|
final String createdAt;
|
|
final 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, bool private) =>
|
|
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,
|
|
};
|
|
}
|