toJson method
Converts the ScheduleModel instance to a JSON map.
Returns a JSON map representation of the ScheduleModel instance.
Implementation
Map<String, dynamic> toJson() {
return {
"id": id,
"date": date.toIso8601String(),
"is_leave": isLeave,
"shift": {
'time_start': timeStart,
'time_end': timeEnd,
'name': name,
},
};
}