getDepartment function
Implementation
Department? getDepartment(Map<dynamic, dynamic> payload) {
Department? department;
if (payload['department'] != null && payload['department']?['id'] != null) {
department = Department(
id: payload['department']['id']?.toString(),
name: payload['department']['name']?.toString(),
);
}
return department;
}