You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.8 KiB
Dart
93 lines
2.8 KiB
Dart
class MemberInformation {
|
|
MemberInformation({
|
|
this.clinics,
|
|
this.doctorId,
|
|
this.email,
|
|
this.employeeId,
|
|
this.memberId,
|
|
this.memberName,
|
|
this.memberNameArabic,
|
|
this.preferredLanguage,
|
|
this.roles,
|
|
});
|
|
|
|
final List<Clinic>? clinics;
|
|
final int? doctorId;
|
|
final String? email;
|
|
final int? employeeId;
|
|
final int? memberId;
|
|
final dynamic memberName;
|
|
final dynamic memberNameArabic;
|
|
final String? preferredLanguage;
|
|
final List<Role>? roles;
|
|
|
|
factory MemberInformation.fromJson(Map<String, dynamic> json) => MemberInformation(
|
|
clinics: json["clinics"] == null ? null : List<Clinic>.from(json["clinics"].map((x) => Clinic.fromJson(x))),
|
|
doctorId: json["doctorId"] == null ? null : json["doctorId"],
|
|
email: json["email"] == null ? null : json["email"],
|
|
employeeId: json["employeeId"] == null ? null : json["employeeId"],
|
|
memberId: json["memberId"] == null ? null : json["memberId"],
|
|
memberName: json["memberName"],
|
|
memberNameArabic: json["memberNameArabic"],
|
|
preferredLanguage: json["preferredLanguage"] == null ? null : json["preferredLanguage"],
|
|
roles: json["roles"] == null ? null : List<Role>.from(json["roles"].map((x) => Role.fromJson(x))),
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"clinics": clinics == null ? null : List<dynamic>.from(clinics!.map((x) => x.toJson())),
|
|
"doctorId": doctorId == null ? null : doctorId,
|
|
"email": email == null ? null : email,
|
|
"employeeId": employeeId == null ? null : employeeId,
|
|
"memberId": memberId == null ? null : memberId,
|
|
"memberName": memberName,
|
|
"memberNameArabic": memberNameArabic,
|
|
"preferredLanguage": preferredLanguage == null ? null : preferredLanguage,
|
|
"roles": roles == null ? null : List<dynamic>.from(roles!.map((x) => x.toJson())),
|
|
};
|
|
}
|
|
|
|
|
|
class Clinic {
|
|
Clinic({
|
|
this.defaultClinic,
|
|
this.id,
|
|
this.name,
|
|
});
|
|
|
|
final bool? defaultClinic;
|
|
final int? id;
|
|
final String? name;
|
|
|
|
factory Clinic.fromJson(Map<String, dynamic> json) => Clinic(
|
|
defaultClinic: json["defaultClinic"] == null ? null : json["defaultClinic"],
|
|
id: json["id"] == null ? null : json["id"],
|
|
name: json["name"] == null ? null : json["name"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"defaultClinic": defaultClinic == null ? null : defaultClinic,
|
|
"id": id == null ? null : id,
|
|
"name": name == null ? null : name,
|
|
};
|
|
}
|
|
|
|
class Role {
|
|
Role({
|
|
this.name,
|
|
this.roleId,
|
|
});
|
|
|
|
final String? name;
|
|
final int? roleId;
|
|
|
|
factory Role.fromJson(Map<String, dynamic> json) => Role(
|
|
name: json["name"] == null ? null : json["name"],
|
|
roleId: json["roleId"] == null ? null : json["roleId"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"name": name == null ? null : name,
|
|
"roleId": roleId == null ? null : roleId,
|
|
};
|
|
}
|