import 'package:json_annotation/json_annotation.dart';

import '../../../apiResponse.dart';

part 'getHolidaysResponse.g.dart';

@JsonSerializable(explicitToJson: true)
class GetHolidaysResponse extends ApiResponse {
  Set<GetHolidaysResponseObject> result;

  GetHolidaysResponse(this.result);

  factory GetHolidaysResponse.fromJson(Map<String, dynamic> json) => _$GetHolidaysResponseFromJson(json);
  Map<String, dynamic> toJson() => _$GetHolidaysResponseToJson(this);
}

@JsonSerializable(explicitToJson: true)
class GetHolidaysResponseObject {
  int id;
  String name;
  String longName;
  int startDate;
  int endDate;

  GetHolidaysResponseObject(this.id, this.name, this.longName, this.startDate, this.endDate);

  factory GetHolidaysResponseObject.fromJson(Map<String, dynamic> json) => _$GetHolidaysResponseObjectFromJson(json);
  Map<String, dynamic> toJson() => _$GetHolidaysResponseObjectToJson(this);
}
