56 lines
1.1 KiB
Dart
56 lines
1.1 KiB
Dart
class ReplyModel {
|
|
ReplyModel({
|
|
this.idRep,
|
|
this.sender,
|
|
this.name,
|
|
this.body,
|
|
this.fotoProfile,
|
|
this.updateAt,
|
|
this.createAt,
|
|
});
|
|
|
|
String? idRep;
|
|
String? sender;
|
|
String? name;
|
|
String? body;
|
|
String? fotoProfile;
|
|
String? updateAt;
|
|
String? createAt;
|
|
|
|
factory ReplyModel.fromJson(Map<String, dynamic> json) => ReplyModel(
|
|
idRep: json["id_replies"],
|
|
sender: json["sender"],
|
|
name: json["name"],
|
|
body: json["body"],
|
|
fotoProfile: json["foto_profile"],
|
|
createAt: json["created_at"],
|
|
updateAt: json["update_at"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id_replies": idRep,
|
|
"sender": sender,
|
|
"name": name,
|
|
"body": body,
|
|
"foto_profile": fotoProfile,
|
|
"update_at": updateAt,
|
|
"created_at": createAt,
|
|
};
|
|
}
|
|
|
|
class LikeModels {
|
|
LikeModels({
|
|
this.userId,
|
|
});
|
|
|
|
bool? userId;
|
|
|
|
factory LikeModels.fromJson(Map<String, dynamic> json) => LikeModels(
|
|
userId: json["user_id"].length > 0,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id_replies": userId,
|
|
};
|
|
}
|