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/rota/ShiftLocation.dart

33 lines
757 B
Dart

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<WeekArrayData>? weekArray;
String? id;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['locationId'] = locationId;
if (weekArray != null) {
map['weekArray'] = weekArray?.map((v) => v.toJson()).toList();
}
map['_id'] = id;
return map;
}
}