import 'package:equatable/equatable.dart';

class LoginBO extends Equatable {
  final String? scope;
  final String? openid;
  final String? accessToken;
  final String? refreshToken;
  final int? expireIn;
  final int? refreshExpireIn;
  final String? clientId;

  const LoginBO({
    this.scope,
    this.openid,
    this.accessToken,
    this.refreshToken,
    this.expireIn,
    this.refreshExpireIn,
    this.clientId,
  });

  factory LoginBO.fromJson(Map<String, dynamic> json) {
    return LoginBO(
      scope: json['scope'] as String?,
      openid: json['openid'] as String?,
      accessToken: json['access_token'] as String?,
      refreshToken: json['refresh_token'] as String?,
      expireIn: json['expire_in'] as int?,
      refreshExpireIn: json['refresh_expire_in'] as int?,
      clientId: json['client_id'] as String?,
    );
  }

  @override
  List<Object?> get props => [
        scope,
        openid,
        accessToken,
        refreshToken,
        expireIn,
        refreshExpireIn,
        clientId,
      ];
}
