Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
55
lib/models/reply_announcement_model.dart
Normal file
55
lib/models/reply_announcement_model.dart
Normal file
@ -0,0 +1,55 @@
|
||||
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,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user