import 'package:json_annotation/json_annotation.dart';

import 'package:pshared/api/responses/account.dart';
import 'package:pshared/api/responses/token.dart';

part 'login_pending.g.dart';


@JsonSerializable(explicitToJson: true)
class PendingLoginResponse {
  final AccountResponse account;
  final TokenData pendingToken;
  final String destination;
  final int ttlSeconds;

  const PendingLoginResponse({
    required this.account,
    required this.pendingToken,
    required this.destination,
    required this.ttlSeconds,
  });

  factory PendingLoginResponse.fromJson(Map<String, dynamic> json) => _$PendingLoginResponseFromJson(json);

  Map<String, dynamic> toJson() => _$PendingLoginResponseToJson(this);
}
