import 'WeekArrayData.dart'; class ShiftLocation { ShiftLocation({ this.locationId, this.weekArray, this.id,}); ShiftLocation.fromJson(dynamic json) { locationId = json['locationId']; if (json['weekArray'] != null && json['weekArray'] is List) { weekArray = []; json['weekArray'].forEach((v) { weekArray?.add(WeekArrayData.fromJson(v)); }); } id = json['_id']; } String? locationId; List? weekArray; String? id; Map toJson() { final map = {}; map['locationId'] = locationId; if (weekArray != null) { map['weekArray'] = weekArray?.map((v) => v.toJson()).toList(); } map['_id'] = id; return map; } }