import 'package:json_annotation/json_annotation.dart';

import '../../../api_response.dart';

part 'timetable_get_classes_response.g.dart';

@JsonSerializable(explicitToJson: true)
class McTimetableClass {
  final int id;
  final String shortName;
  final String longName;

  McTimetableClass({
    required this.id,
    required this.shortName,
    required this.longName,
  });

  factory McTimetableClass.fromJson(Map<String, dynamic> json) =>
      _$McTimetableClassFromJson(json);
  Map<String, dynamic> toJson() => _$McTimetableClassToJson(this);
}

@JsonSerializable(explicitToJson: true)
class TimetableGetClassesResponse extends ApiResponse {
  final List<McTimetableClass> result;

  TimetableGetClassesResponse({required this.result});

  factory TimetableGetClassesResponse.fromJson(Map<String, dynamic> json) =>
      _$TimetableGetClassesResponseFromJson(json);
  Map<String, dynamic> toJson() => _$TimetableGetClassesResponseToJson(this);
}
