mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-13 19:19:09 +08:00
880a0d4209
Signed-off-by: 21pages <pages21@163.com>
40 lines
954 B
Dart
40 lines
954 B
Dart
import 'package:flutter_hbb/models/peer_model.dart';
|
|
|
|
class UserPayload {
|
|
String name = '';
|
|
String email = '';
|
|
String note = '';
|
|
int? status;
|
|
String grp = '';
|
|
bool is_admin = false;
|
|
|
|
UserPayload.fromJson(Map<String, dynamic> json)
|
|
: name = json['name'] ?? '',
|
|
email = json['email'] ?? '',
|
|
note = json['note'] ?? '',
|
|
status = json['status'],
|
|
grp = json['grp'] ?? '',
|
|
is_admin = json['is_admin'] == true;
|
|
}
|
|
|
|
class PeerPayload {
|
|
String id = '';
|
|
String info = '';
|
|
int? status;
|
|
String user = '';
|
|
String user_name = '';
|
|
String note = '';
|
|
|
|
PeerPayload.fromJson(Map<String, dynamic> json)
|
|
: id = json['id'] ?? '',
|
|
info = json['info'] ?? '',
|
|
status = json['status'],
|
|
user = json['user'] ?? '',
|
|
user_name = json['user_name'] ?? '',
|
|
note = json['note'] ?? '';
|
|
|
|
static Peer toPeer(PeerPayload p) {
|
|
return Peer.fromJson({"id": p.id});
|
|
}
|
|
}
|