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/Days.dart

63 lines
1.4 KiB
Dart

import '../profileData/user_data.dart';
class Days {
Days({
this.day,
this.shiftStartTime,
this.shiftEndTime,
this.workHrs,
this.patientId,
this.isSleepOver,
this.isOverNightStay,
this.addedby,
this.note,
this.id,
this.templateId,
});
Days.fromJson(dynamic json) {
day = json['day'];
shiftStartTime = json['shiftStartTime'];
shiftEndTime = json['shiftEndTime'];
workHrs = json['workHrs'];
patientId =
json['patientId'] != null ? UserData.fromJson(json['patientId']) : null;
isSleepOver = json['isSleepOver'];
isOverNightStay = json['isOverNightStay'];
addedby = json['addedby'];
note = json['note'];
id = json['_id'];
templateId = json['templateId'];
}
String? day;
int? shiftStartTime;
int? shiftEndTime;
String? workHrs;
UserData? patientId;
bool? isSleepOver;
bool? isOverNightStay;
String? addedby;
String? note;
String? id;
String? templateId;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['day'] = day;
map['shiftStartTime'] = shiftStartTime;
map['shiftEndTime'] = shiftEndTime;
map['workHrs'] = workHrs;
if (patientId != null) {
map['patientId'] = patientId?.toJson();
}
map['isSleepOver'] = isSleepOver;
map['isOverNightStay'] = isOverNightStay;
map['addedby'] = addedby;
map['note'] = note;
map['_id'] = id;
map['templateId'] = templateId;
return map;
}
}