import 'package:json_annotation/json_annotation.dart';

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

part 'timetable_get_students_response.g.dart';

@JsonSerializable(explicitToJson: true)
class McTimetableStudent {
  final int id;
  final String firstName;
  final String lastName;
  final String displayName;

  McTimetableStudent({
    required this.id,
    required this.firstName,
    required this.lastName,
    required this.displayName,
  });

  factory McTimetableStudent.fromJson(Map<String, dynamic> json) =>
      _$McTimetableStudentFromJson(json);
  Map<String, dynamic> toJson() => _$McTimetableStudentToJson(this);
}

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

  TimetableGetStudentsResponse({required this.result});

  factory TimetableGetStudentsResponse.fromJson(Map<String, dynamic> json) =>
      _$TimetableGetStudentsResponseFromJson(json);
  Map<String, dynamic> toJson() => _$TimetableGetStudentsResponseToJson(this);
}
