import 'package:json_annotation/json_annotation.dart';

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

part 'timetable_get_rooms_response.g.dart';

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

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

  factory McRoom.fromJson(Map<String, dynamic> json) => _$McRoomFromJson(json);
  Map<String, dynamic> toJson() => _$McRoomToJson(this);
}

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

  TimetableGetRoomsResponse({required this.result});

  factory TimetableGetRoomsResponse.fromJson(Map<String, dynamic> json) =>
      _$TimetableGetRoomsResponseFromJson(json);
  Map<String, dynamic> toJson() => _$TimetableGetRoomsResponseToJson(this);
}
