pcastlivetv/lib/models/user_model.dart

49 lines
1.3 KiB
Dart

class UserModel {
int? id;
String? message;
String? name;
String? companyname;
String? url;
String? email;
String? channel;
String? cpfcnpj;
String? usertype;
String? blocked;
String? cancelled;
String? createdby;
UserModel({this.id, this.name, this.companyname, this.email, this.channel, this.usertype, this.blocked, this.cancelled, this.createdby, this.cpfcnpj, this.url});
UserModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
message = json['message'] ?? '';
name = json['name'];
companyname = json['companyname'];
url = json['url'];
cpfcnpj = json['cpfcnpj'];
email = json['email'];
channel = json['channel'];
usertype = json['usertype'];
blocked = json['blocked'];
cancelled = json['cancelled'];
createdby = json['createdby'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['message'] = message;
data['name'] = name;
data['companyname'] = companyname;
data['url'] = url;
data['cpfcnpj'] = cpfcnpj;
data['email'] = email;
data['channel'] = channel;
data['usertype'] = usertype;
data['blocked'] = blocked;
data['cancelled'] = cancelled;
data['createdby'] = createdby;
return data;
}
}