import 'package:didvan/models/comment/user.dart'; class MentionData { int id; String text; String createdAt; List mentions; final UserOverview user; MentionData({ required this.id, required this.text, required this.createdAt, required this.mentions, required this.user, }); factory MentionData.fromJson(Map json) => MentionData( id: json['id'], text: json['text'], createdAt: json['createdAt'], mentions: List.from(json['mentions']), user: UserOverview.fromJson(json['user']), ); Map toJson() => { 'id': id, 'text': text, 'createdAt': createdAt, 'mentions': mentions, 'user': user.toJson(), }; }