63 lines
1.4 KiB
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;
|
|
}
|
|
}
|