class StaffWorkloadResponse { StaffWorkloadResponse({ this.status, this.message, this.data,}); StaffWorkloadResponse.fromJson(dynamic json) { status = json['status']; message = json['message']; data = json['data'] != null ? StaffWorkloadData.fromJson(json['data']) : null; } String? status; String? message; StaffWorkloadData? data; Map toJson() { final map = {}; map['status'] = status; map['message'] = message; if (data != null) { map['data'] = data?.toJson(); } return map; } } class StaffWorkloadData { StaffWorkloadData({ this.staffWorkLoads, this.count, this.offset, this.limit,}); StaffWorkloadData.fromJson(dynamic json) { if (json['staffWorkLoads'] != null) { staffWorkLoads = []; json['staffWorkLoads'].forEach((v) { staffWorkLoads?.add(StaffWorkLoads.fromJson(v)); }); } count = json['count']; offset = json['offset']; limit = json['limit']; } List? staffWorkLoads; int? count; int? offset; int? limit; Map toJson() { final map = {}; if (staffWorkLoads != null) { map['staffWorkLoads'] = staffWorkLoads?.map((v) => v.toJson()).toList(); } map['count'] = count; map['offset'] = offset; map['limit'] = limit; return map; } } class StaffWorkLoads { StaffWorkLoads({ this.holidayEntitlement, this.id, this.isCurrentWrkLd, this.startDate, this.endDate, this.holidayAlwnNoOfDys, this.holidayAlwnNoOfHours, this.holidaysAvailed, this.holidaysRemaining, this.staffMember, this.carriedOverHours, this.active, this.createdAt, this.updatedAt,}); StaffWorkLoads.fromJson(dynamic json) { holidayEntitlement = json['holidayEntitlement'] != null ? HolidayEntitlement.fromJson(json['holidayEntitlement']) : null; id = json['_id']; isCurrentWrkLd = json['isCurrentWrkLd']; startDate = json['startDate']; endDate = json['endDate']; holidayAlwnNoOfDys = json['holidayAlwnNoOfDys']; holidayAlwnNoOfHours = json['holidayAlwnNoOfHours']; holidaysAvailed = json['holidaysAvailed']; holidaysRemaining = json['holidaysRemaining']; staffMember = json['staffMember'] is Map ? StaffMember.fromJson(json['staffMember']) : null; carriedOverHours = json['carriedOverHours']; active = json['active']; createdAt = json['createdAt']; updatedAt = json['updatedAt']; } HolidayEntitlement? holidayEntitlement; String? id; bool? isCurrentWrkLd; String? startDate; String? endDate; int? holidayAlwnNoOfDys; int? holidayAlwnNoOfHours; int? holidaysAvailed; int? holidaysRemaining; StaffMember? staffMember; int? carriedOverHours; bool? active; String? createdAt; String? updatedAt; Map toJson() { final map = {}; if (holidayEntitlement != null) { map['holidayEntitlement'] = holidayEntitlement?.toJson(); } map['_id'] = id; map['isCurrentWrkLd'] = isCurrentWrkLd; map['startDate'] = startDate; map['endDate'] = endDate; map['holidayAlwnNoOfDys'] = holidayAlwnNoOfDys; map['holidayAlwnNoOfHours'] = holidayAlwnNoOfHours; map['holidaysAvailed'] = holidaysAvailed; map['holidaysRemaining'] = holidaysRemaining; if (staffMember != null) { map['staffMember'] = staffMember?.toJson(); } map['carriedOverHours'] = carriedOverHours; map['active'] = active; map['createdAt'] = createdAt; map['updatedAt'] = updatedAt; return map; } } class StaffMember { StaffMember({ this.id, this.user,}); StaffMember.fromJson(dynamic json) { id = json['_id']; user = json['user'] != null ? User.fromJson(json['user']) : null; } String? id; User? user; Map toJson() { final map = {}; map['_id'] = id; if (user != null) { map['user'] = user?.toJson(); } return map; } } class User { User({ this.id, this.name, this.profilePictureUrl,}); User.fromJson(dynamic json) { id = json['_id']; name = json['name']; profilePictureUrl = json['profile_picture_url']; } String? id; String? name; String? profilePictureUrl; Map toJson() { final map = {}; map['_id'] = id; map['name'] = name; map['profile_picture_url'] = profilePictureUrl; return map; } } class HolidayEntitlement { HolidayEntitlement({ this.numberOfDays, this.numberOfHours, this.numberOfWeeks,}); HolidayEntitlement.fromJson(dynamic json) { numberOfDays = json['numberOfDays']; numberOfHours = json['numberOfHours']; numberOfWeeks = json['numberOfWeeks']; } int? numberOfDays; int? numberOfHours; int? numberOfWeeks; Map toJson() { final map = {}; map['numberOfDays'] = numberOfDays; map['numberOfHours'] = numberOfHours; map['numberOfWeeks'] = numberOfWeeks; return map; } }