add structure
This commit is contained in:
33
lib/vo/report_user.dart
Normal file
33
lib/vo/report_user.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
class ReportUser {
|
||||
String id;
|
||||
String reportID;
|
||||
String reportName;
|
||||
String userID;
|
||||
String userName;
|
||||
ReportUser({
|
||||
this.id,
|
||||
this.reportID,
|
||||
this.reportName,
|
||||
this.userID,
|
||||
this.userName,
|
||||
});
|
||||
factory ReportUser.fromMap(Map<String, dynamic> map, String docID) {
|
||||
return ReportUser(
|
||||
id: docID,
|
||||
reportID: map['report_id'],
|
||||
reportName: map['report_name'],
|
||||
userID: map['user_id'],
|
||||
userName: map['user_name'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
"id": id,
|
||||
"report_id": reportID,
|
||||
"report_name": reportName,
|
||||
"user_id": userID,
|
||||
"user_name": userName
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user