import 'package:json_annotation/json_annotation.dart';

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

part 'create_room_response.g.dart';

@JsonSerializable(explicitToJson: true)
class CreateRoomResponse extends ApiResponse {
  final CreateRoomResponseData data;

  CreateRoomResponse(this.data);

  factory CreateRoomResponse.fromJson(Map<String, dynamic> json) =>
      _$CreateRoomResponseFromJson(json);
  Map<String, dynamic> toJson() => _$CreateRoomResponseToJson(this);
}

@JsonSerializable()
class CreateRoomResponseData {
  final String token;

  CreateRoomResponseData(this.token);

  factory CreateRoomResponseData.fromJson(Map<String, dynamic> json) =>
      _$CreateRoomResponseDataFromJson(json);
  Map<String, dynamic> toJson() => _$CreateRoomResponseDataToJson(this);
}
