27 lines
714 B
Dart
27 lines
714 B
Dart
class StaffHolidays {
|
|
StaffHolidays({
|
|
this.isStaffHolidays,
|
|
this.calculatedDates,});
|
|
|
|
StaffHolidays.fromJson(dynamic json) {
|
|
isStaffHolidays = json['isStaffHolidays'];
|
|
// if (json['calculatedDates'] != null) {
|
|
// calculatedDates = [];
|
|
// json['calculatedDates'].forEach((v) {
|
|
// calculatedDates?.add(Dynamic.fromJson(v));
|
|
// });
|
|
// }
|
|
}
|
|
bool? isStaffHolidays;
|
|
List<dynamic>? calculatedDates;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['isStaffHolidays'] = isStaffHolidays;
|
|
if (calculatedDates != null) {
|
|
map['calculatedDates'] = calculatedDates?.map((v) => v.toJson()).toList();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
} |