2021-03-10 16:54:41 +00:00
|
|
|
/// Conversation member
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
class ConversationMember {
|
2022-03-10 18:39:57 +00:00
|
|
|
final int userID;
|
|
|
|
final int lastMessageSeen;
|
|
|
|
final int lastAccessTime;
|
|
|
|
final bool following;
|
|
|
|
final bool isAdmin;
|
2021-03-10 16:54:41 +00:00
|
|
|
|
|
|
|
const ConversationMember({
|
2022-03-10 19:36:55 +00:00
|
|
|
required this.userID,
|
|
|
|
required this.lastMessageSeen,
|
|
|
|
required this.lastAccessTime,
|
|
|
|
required this.following,
|
|
|
|
required this.isAdmin,
|
|
|
|
});
|
2021-03-10 16:54:41 +00:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
'userID': userID,
|
|
|
|
'lastMessageSeen': lastMessageSeen,
|
|
|
|
'lastAccessTime': lastAccessTime,
|
|
|
|
'following': following,
|
|
|
|
'isAdmin': isAdmin,
|
|
|
|
};
|
|
|
|
|
|
|
|
ConversationMember.fromJSON(Map<String, dynamic> json)
|
|
|
|
: userID = json["userID"],
|
|
|
|
lastMessageSeen = json["lastMessageSeen"],
|
|
|
|
lastAccessTime = json["lastAccessTime"],
|
|
|
|
following = json["following"],
|
|
|
|
isAdmin = json["isAdmin"];
|
|
|
|
}
|