toJson method

Map<String, dynamic> toJson()

Chuyển đổi sang JSON để gửi đến server

Implementation

Map<String, dynamic> toJson() {
  return {
    'user_id': userId,
    'status': type.value,
    'status_desc': type == UserStatusType.custom ? customMessage : null,
    'last_seen_at': lastSeenAt,
  };
}