This repository has been archived on 2024-10-18. You can view files and clone it, but cannot push or open issues or pull requests.
ftc_patient_app/lib/models/clients/allClientsList/AllClientsResponse.dart

734 lines
22 KiB
Dart

import '../../profileData/user_data.dart';
class AllClientsResponse {
AllClientsResponse({
this.success,
this.status,
this.message,
this.data,});
AllClientsResponse.fromJson(dynamic json) {
status = json['status'];
message = json['message'];
data = json['data'] != null ? AllClientsResponseData.fromJson(json['data']) : null;
}
//Local var
bool? success;
String? status;
String? message;
AllClientsResponseData? data;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['status'] = status;
map['message'] = message;
if (data != null) {
map['data'] = data?.toJson();
}
return map;
}
}
class AllClientsResponseData {
AllClientsResponseData({
this.users,
this.count,
this.offset,
this.limit,});
AllClientsResponseData.fromJson(dynamic json) {
if (json['users'] != null) {
users = [];
json['users'].forEach((v) {
users?.add(UserData.fromJson(v));
});
}
count = json['count'];
offset = json['offset'];
limit = json['limit'];
}
List<UserData>? users;
int? count;
int? offset;
int? limit;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (users != null) {
map['users'] = users?.map((v) => v.toJson()).toList();
}
map['count'] = count;
map['offset'] = offset;
map['limit'] = limit;
return map;
}
}
// class Users {
// Users({
// this.id,
// this.userModelName,
// this.active,
// this.role,
// this.profilePictureUrl,
// this.profileVideoUrl,
// this.deviceId,
// this.verificationCode,
// this.isVerified,
// this.approved,
// this.blocked,
// this.name,
// this.phoneNumber,
// this.email,
// this.createdAt,
// this.updatedAt,
// this.v,
// this.modelId,});
//
// Users.fromJson(dynamic json) {
// id = json['_id'];
// userModelName = json['userModelName'];
// active = json['active'];
// role = json['role'];
// profilePictureUrl = json['profile_picture_url'];
// profileVideoUrl = json['profile_video_url'];
// deviceId = json['deviceId'];
// verificationCode = json['verification_code'];
// isVerified = json['is_verified'];
// approved = json['approved'];
// blocked = json['blocked'];
// name = json['name'];
// phoneNumber = json['phoneNumber'];
// email = json['email'];
// createdAt = json['createdAt'];
// updatedAt = json['updatedAt'];
// v = json['__v'];
// modelId = json['modelId'] != null ? ModelId.fromJson(json['modelId']) : null;
// }
// String? id;
// String? userModelName;
// bool? active;
// String? role;
// String? profilePictureUrl;
// String? profileVideoUrl;
// String? deviceId;
// String? verificationCode;
// bool? isVerified;
// bool? approved;
// bool? blocked;
// String? name;
// String? phoneNumber;
// String? email;
// String? createdAt;
// String? updatedAt;
// int? v;
// ModelId? modelId;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// map['_id'] = id;
// map['userModelName'] = userModelName;
// map['active'] = active;
// map['role'] = role;
// map['profile_picture_url'] = profilePictureUrl;
// map['profile_video_url'] = profileVideoUrl;
// map['deviceId'] = deviceId;
// map['verification_code'] = verificationCode;
// map['is_verified'] = isVerified;
// map['approved'] = approved;
// map['blocked'] = blocked;
// map['name'] = name;
// map['phoneNumber'] = phoneNumber;
// map['email'] = email;
// map['createdAt'] = createdAt;
// map['updatedAt'] = updatedAt;
// map['__v'] = v;
// if (modelId != null) {
// map['modelId'] = modelId?.toJson();
// }
// return map;
// }
//
// }
//
// class ModelId {
// ModelId({
// this.id,
// this.suProvider,
// this.currSU,
// this.shifts,
// this.serviceUserMedications,
// this.homeVisitSignOut,
// this.srUsShiftsRequired,
// this.suEnquiries,
// this.active,
// this.diagnosises,
// this.suLastName,
// this.name,
// this.addedby,
// this.user,
// this.createdAt,
// this.updatedAt,
// this.v,
// this.lastModifiedBy,
// this.providerName,
// this.referenceId,
// this.seMedicalAlert,
// this.suAddress1,
// this.suAddress2,
// this.suAge,
// this.suCity,
// this.suDOB,
// this.suEmailHome,
// this.suEmailWork,
// this.suEmergencyContact,
// this.suFamilyHead,
// this.suFirstMiddleName,
// this.suFirstVisitDate,
// this.suHomePhone,
// this.suLastVisitDate,
// this.suMobileHomeNo,
// this.suMobileWorkNo,
// this.suNote,
// this.suPrefHomeNo,
// this.suPrefWorkNo,
// this.suPreferredName,
// this.suReferredBY,
// this.suSex,
// this.suSsn,
// this.suState,
// this.suWorkPhone,
// this.suZip,});
//
// ModelId.fromJson(dynamic json) {
// id = json['_id'];
// if (json['suProvider'] != null) {
// suProvider = [];
// json['suProvider'].forEach((v) {
// suProvider?.add(SuProvider.fromJson(v));
// });
// }
// currSU = json['currSU'];
// if (json['shifts'] != null) {
// shifts = [];
// json['shifts'].forEach((v) {
// shifts?.add(Dynamic.fromJson(v));
// });
// }
// if (json['serviceUserMedications'] != null) {
// serviceUserMedications = [];
// json['serviceUserMedications'].forEach((v) {
// serviceUserMedications?.add(Dynamic.fromJson(v));
// });
// }
// if (json['homeVisitSignOut'] != null) {
// homeVisitSignOut = [];
// json['homeVisitSignOut'].forEach((v) {
// homeVisitSignOut?.add(Dynamic.fromJson(v));
// });
// }
// if (json['srUsShiftsRequired'] != null) {
// srUsShiftsRequired = [];
// json['srUsShiftsRequired'].forEach((v) {
// srUsShiftsRequired?.add(Dynamic.fromJson(v));
// });
// }
// if (json['suEnquiries'] != null) {
// suEnquiries = [];
// json['suEnquiries'].forEach((v) {
// suEnquiries?.add(SuEnquiries.fromJson(v));
// });
// }
// active = json['active'];
// if (json['diagnosises'] != null) {
// diagnosises = [];
// json['diagnosises'].forEach((v) {
// diagnosises?.add(Dynamic.fromJson(v));
// });
// }
// suLastName = json['suLastName'];
// name = json['name'];
// addedby = json['addedby'];
// user = json['user'];
// createdAt = json['createdAt'];
// updatedAt = json['updatedAt'];
// v = json['__v'];
// lastModifiedBy = json['lastModifiedBy'];
// providerName = json['providerName'];
// referenceId = json['referenceId'];
// seMedicalAlert = json['seMedicalAlert'];
// suAddress1 = json['suAddress1'];
// suAddress2 = json['suAddress2'];
// suAge = json['suAge'];
// suCity = json['suCity'];
// suDOB = json['suDOB'];
// suEmailHome = json['suEmailHome'];
// suEmailWork = json['suEmailWork'];
// suEmergencyContact = json['suEmergencyContact'];
// suFamilyHead = json['suFamilyHead'];
// suFirstMiddleName = json['suFirstMiddleName'];
// suFirstVisitDate = json['suFirstVisitDate'];
// suHomePhone = json['suHomePhone'];
// suLastVisitDate = json['suLastVisitDate'];
// suMobileHomeNo = json['suMobileHomeNo'];
// suMobileWorkNo = json['suMobileWorkNo'];
// suNote = json['suNote'];
// suPrefHomeNo = json['suPrefHomeNo'];
// suPrefWorkNo = json['suPrefWorkNo'];
// suPreferredName = json['suPreferredName'];
// suReferredBY = json['suReferredBY'];
// suSex = json['suSex'];
// suSsn = json['suSsn'];
// suState = json['suState'];
// suWorkPhone = json['suWorkPhone'];
// suZip = json['suZip'];
// }
// String? id;
// List<SuProvider>? suProvider;
// bool? currSU;
// List<dynamic>? shifts;
// List<dynamic>? serviceUserMedications;
// List<dynamic>? homeVisitSignOut;
// List<dynamic>? srUsShiftsRequired;
// List<SuEnquiries>? suEnquiries;
// bool? active;
// List<dynamic>? diagnosises;
// String? suLastName;
// String? name;
// String? addedby;
// String? user;
// String? createdAt;
// String? updatedAt;
// int? v;
// String? lastModifiedBy;
// String? providerName;
// String? referenceId;
// String? seMedicalAlert;
// String? suAddress1;
// String? suAddress2;
// String? suAge;
// String? suCity;
// String? suDOB;
// String? suEmailHome;
// String? suEmailWork;
// String? suEmergencyContact;
// String? suFamilyHead;
// String? suFirstMiddleName;
// String? suFirstVisitDate;
// String? suHomePhone;
// String? suLastVisitDate;
// String? suMobileHomeNo;
// String? suMobileWorkNo;
// String? suNote;
// String? suPrefHomeNo;
// String? suPrefWorkNo;
// String? suPreferredName;
// String? suReferredBY;
// String? suSex;
// String? suSsn;
// String? suState;
// String? suWorkPhone;
// String? suZip;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// map['_id'] = id;
// if (suProvider != null) {
// map['suProvider'] = suProvider?.map((v) => v.toJson()).toList();
// }
// map['currSU'] = currSU;
// if (shifts != null) {
// map['shifts'] = shifts?.map((v) => v.toJson()).toList();
// }
// if (serviceUserMedications != null) {
// map['serviceUserMedications'] = serviceUserMedications?.map((v) => v.toJson()).toList();
// }
// if (homeVisitSignOut != null) {
// map['homeVisitSignOut'] = homeVisitSignOut?.map((v) => v.toJson()).toList();
// }
// if (srUsShiftsRequired != null) {
// map['srUsShiftsRequired'] = srUsShiftsRequired?.map((v) => v.toJson()).toList();
// }
// if (suEnquiries != null) {
// map['suEnquiries'] = suEnquiries?.map((v) => v.toJson()).toList();
// }
// map['active'] = active;
// if (diagnosises != null) {
// map['diagnosises'] = diagnosises?.map((v) => v.toJson()).toList();
// }
// map['suLastName'] = suLastName;
// map['name'] = name;
// map['addedby'] = addedby;
// map['user'] = user;
// map['createdAt'] = createdAt;
// map['updatedAt'] = updatedAt;
// map['__v'] = v;
// map['lastModifiedBy'] = lastModifiedBy;
// map['providerName'] = providerName;
// map['referenceId'] = referenceId;
// map['seMedicalAlert'] = seMedicalAlert;
// map['suAddress1'] = suAddress1;
// map['suAddress2'] = suAddress2;
// map['suAge'] = suAge;
// map['suCity'] = suCity;
// map['suDOB'] = suDOB;
// map['suEmailHome'] = suEmailHome;
// map['suEmailWork'] = suEmailWork;
// map['suEmergencyContact'] = suEmergencyContact;
// map['suFamilyHead'] = suFamilyHead;
// map['suFirstMiddleName'] = suFirstMiddleName;
// map['suFirstVisitDate'] = suFirstVisitDate;
// map['suHomePhone'] = suHomePhone;
// map['suLastVisitDate'] = suLastVisitDate;
// map['suMobileHomeNo'] = suMobileHomeNo;
// map['suMobileWorkNo'] = suMobileWorkNo;
// map['suNote'] = suNote;
// map['suPrefHomeNo'] = suPrefHomeNo;
// map['suPrefWorkNo'] = suPrefWorkNo;
// map['suPreferredName'] = suPreferredName;
// map['suReferredBY'] = suReferredBY;
// map['suSex'] = suSex;
// map['suSsn'] = suSsn;
// map['suState'] = suState;
// map['suWorkPhone'] = suWorkPhone;
// map['suZip'] = suZip;
// return map;
// }
//
// }
//
// class SuEnquiries {
// SuEnquiries({
// this.id,
// this.initialContactDate,
// this.suEnqContactNo,
// this.suEnqEmail,
// this.reasonForNeed,
// this.suEnqStatus,
// this.requestType,
// this.suEnqComments,
// this.serviceUser,
// this.addedby,
// this.active,
// this.referenceId,
// this.createdAt,
// this.updatedAt,
// this.v,
// this.lastModifiedBy,});
//
// SuEnquiries.fromJson(dynamic json) {
// id = json['_id'];
// initialContactDate = json['initialContactDate'];
// suEnqContactNo = json['suEnqContactNo'];
// suEnqEmail = json['suEnqEmail'];
// reasonForNeed = json['reasonForNeed'];
// suEnqStatus = json['suEnqStatus'];
// requestType = json['requestType'];
// suEnqComments = json['suEnqComments'];
// serviceUser = json['serviceUser'];
// addedby = json['addedby'];
// active = json['active'];
// referenceId = json['referenceId'];
// createdAt = json['createdAt'];
// updatedAt = json['updatedAt'];
// v = json['__v'];
// lastModifiedBy = json['lastModifiedBy'];
// }
// String? id;
// String? initialContactDate;
// String? suEnqContactNo;
// String? suEnqEmail;
// String? reasonForNeed;
// String? suEnqStatus;
// String? requestType;
// String? suEnqComments;
// String? serviceUser;
// String? addedby;
// bool? active;
// String? referenceId;
// String? createdAt;
// String? updatedAt;
// int? v;
// String? lastModifiedBy;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// map['_id'] = id;
// map['initialContactDate'] = initialContactDate;
// map['suEnqContactNo'] = suEnqContactNo;
// map['suEnqEmail'] = suEnqEmail;
// map['reasonForNeed'] = reasonForNeed;
// map['suEnqStatus'] = suEnqStatus;
// map['requestType'] = requestType;
// map['suEnqComments'] = suEnqComments;
// map['serviceUser'] = serviceUser;
// map['addedby'] = addedby;
// map['active'] = active;
// map['referenceId'] = referenceId;
// map['createdAt'] = createdAt;
// map['updatedAt'] = updatedAt;
// map['__v'] = v;
// map['lastModifiedBy'] = lastModifiedBy;
// return map;
// }
//
// }
//
// class SuProvider {
// SuProvider({
// this.contractedHours,
// this.id,
// this.staffMemberName,
// this.staffDesignation,
// this.staffOnLeave,
// this.supervisorId,
// this.holidays,
// this.complianceDocuments,
// this.driverFields,
// this.niNumber,
// this.kin,
// this.user,
// this.clients,
// this.staffWorkLoads,
// this.staffHolidayRequests,
// this.staffTrainings,
// this.supervision,
// this.underSupervisions,
// this.staffWorkingDays,
// this.stafDob,
// this.active,
// this.covidCheck,
// this.createdAt,
// this.updatedAt,
// this.v,
// this.staffDisciplinaries,
// this.staffReferences,});
//
// SuProvider.fromJson(dynamic json) {
// contractedHours = json['contractedHours'] != null ? ContractedHours.fromJson(json['contractedHours']) : null;
// id = json['_id'];
// staffMemberName = json['staffMemberName'];
// staffDesignation = json['staffDesignation'];
// staffOnLeave = json['staffOnLeave'];
// supervisorId = json['supervisorId'];
// if (json['holidays'] != null) {
// holidays = [];
// json['holidays'].forEach((v) {
// holidays?.add(Dynamic.fromJson(v));
// });
// }
// if (json['complianceDocuments'] != null) {
// complianceDocuments = [];
// json['complianceDocuments'].forEach((v) {
// complianceDocuments?.add(Dynamic.fromJson(v));
// });
// }
// driverFields = json['driverFields'] != null ? DriverFields.fromJson(json['driverFields']) : null;
// niNumber = json['niNumber'];
// kin = json['kin'];
// user = json['user'];
// if (json['clients'] != null) {
// clients = [];
// json['clients'].forEach((v) {
// clients?.add(Dynamic.fromJson(v));
// });
// }
// staffWorkLoads = json['staffWorkLoads'] != null ? json['staffWorkLoads'].cast<String>() : [];
// if (json['staffHolidayRequests'] != null) {
// staffHolidayRequests = [];
// json['staffHolidayRequests'].forEach((v) {
// staffHolidayRequests?.add(Dynamic.fromJson(v));
// });
// }
// if (json['staffTrainings'] != null) {
// staffTrainings = [];
// json['staffTrainings'].forEach((v) {
// staffTrainings?.add(Dynamic.fromJson(v));
// });
// }
// supervision = json['supervision'] != null ? Supervision.fromJson(json['supervision']) : null;
// if (json['underSupervisions'] != null) {
// underSupervisions = [];
// json['underSupervisions'].forEach((v) {
// underSupervisions?.add(Dynamic.fromJson(v));
// });
// }
// if (json['staffWorkingDays'] != null) {
// staffWorkingDays = [];
// json['staffWorkingDays'].forEach((v) {
// staffWorkingDays?.add(Dynamic.fromJson(v));
// });
// }
// stafDob = json['stafDob'];
// active = json['active'];
// covidCheck = json['covidCheck'];
// createdAt = json['createdAt'];
// updatedAt = json['updatedAt'];
// v = json['__v'];
// staffDisciplinaries = json['staffDisciplinaries'];
// staffReferences = json['staffReferences'];
// }
// ContractedHours? contractedHours;
// String? id;
// String? staffMemberName;
// String? staffDesignation;
// bool? staffOnLeave;
// String? supervisorId;
// List<dynamic>? holidays;
// List<dynamic>? complianceDocuments;
// DriverFields? driverFields;
// String? niNumber;
// String? kin;
// String? user;
// List<dynamic>? clients;
// List<String>? staffWorkLoads;
// List<dynamic>? staffHolidayRequests;
// List<dynamic>? staffTrainings;
// Supervision? supervision;
// List<dynamic>? underSupervisions;
// List<dynamic>? staffWorkingDays;
// String? stafDob;
// bool? active;
// bool? covidCheck;
// String? createdAt;
// String? updatedAt;
// int? v;
// String? staffDisciplinaries;
// String? staffReferences;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// if (contractedHours != null) {
// map['contractedHours'] = contractedHours?.toJson();
// }
// map['_id'] = id;
// map['staffMemberName'] = staffMemberName;
// map['staffDesignation'] = staffDesignation;
// map['staffOnLeave'] = staffOnLeave;
// map['supervisorId'] = supervisorId;
// if (holidays != null) {
// map['holidays'] = holidays?.map((v) => v.toJson()).toList();
// }
// if (complianceDocuments != null) {
// map['complianceDocuments'] = complianceDocuments?.map((v) => v.toJson()).toList();
// }
// if (driverFields != null) {
// map['driverFields'] = driverFields?.toJson();
// }
// map['niNumber'] = niNumber;
// map['kin'] = kin;
// map['user'] = user;
// if (clients != null) {
// map['clients'] = clients?.map((v) => v.toJson()).toList();
// }
// map['staffWorkLoads'] = staffWorkLoads;
// if (staffHolidayRequests != null) {
// map['staffHolidayRequests'] = staffHolidayRequests?.map((v) => v.toJson()).toList();
// }
// if (staffTrainings != null) {
// map['staffTrainings'] = staffTrainings?.map((v) => v.toJson()).toList();
// }
// if (supervision != null) {
// map['supervision'] = supervision?.toJson();
// }
// if (underSupervisions != null) {
// map['underSupervisions'] = underSupervisions?.map((v) => v.toJson()).toList();
// }
// if (staffWorkingDays != null) {
// map['staffWorkingDays'] = staffWorkingDays?.map((v) => v.toJson()).toList();
// }
// map['stafDob'] = stafDob;
// map['active'] = active;
// map['covidCheck'] = covidCheck;
// map['createdAt'] = createdAt;
// map['updatedAt'] = updatedAt;
// map['__v'] = v;
// map['staffDisciplinaries'] = staffDisciplinaries;
// map['staffReferences'] = staffReferences;
// return map;
// }
//
// }
//
// class Supervision {
// Supervision({
// this.supervisionName,
// this.sprDueDate,
// this.sprStatus,
// this.sprResult,
// this.templateTitleId,});
//
// Supervision.fromJson(dynamic json) {
// supervisionName = json['supervisionName'];
// sprDueDate = json['sprDueDate'];
// sprStatus = json['sprStatus'];
// sprResult = json['sprResult'];
// templateTitleId = json['templateTitleId'];
// }
// String? supervisionName;
// String? sprDueDate;
// String? sprStatus;
// String? sprResult;
// String? templateTitleId;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// map['supervisionName'] = supervisionName;
// map['sprDueDate'] = sprDueDate;
// map['sprStatus'] = sprStatus;
// map['sprResult'] = sprResult;
// map['templateTitleId'] = templateTitleId;
// return map;
// }
//
// }
//
// class DriverFields {
// DriverFields({
// this.isDriver,
// this.vehicleType,});
//
// DriverFields.fromJson(dynamic json) {
// isDriver = json['isDriver'];
// vehicleType = json['vehicleType'];
// }
// bool? isDriver;
// String? vehicleType;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// map['isDriver'] = isDriver;
// map['vehicleType'] = vehicleType;
// return map;
// }
//
// }
//
// class ContractedHours {
// ContractedHours({
// this.contractedHours,
// this.totalShiftHoursWeek,
// this.noOfShifts,});
//
// ContractedHours.fromJson(dynamic json) {
// contractedHours = json['contractedHours'];
// totalShiftHoursWeek = json['totalShiftHoursWeek'];
// noOfShifts = json['noOfShifts'];
// }
// int? contractedHours;
// int? totalShiftHoursWeek;
// int? noOfShifts;
//
// Map<String, dynamic> toJson() {
// final map = <String, dynamic>{};
// map['contractedHours'] = contractedHours;
// map['totalShiftHoursWeek'] = totalShiftHoursWeek;
// map['noOfShifts'] = noOfShifts;
// return map;
// }
//
// }