class AuthenticationResponse {
  String name = "";
  String cmpCuststatus = "";
  String cmpCustlastlogin = "";
  String cmpCustcode = "";
  // Role userRole = "";
  String jwtToken = "";
  String refreshToken = "";
  bool isKycVerified = false;

  AuthenticationResponse({
    this.name = "",
    this.cmpCuststatus = "",
    this.cmpCustlastlogin = "",
    this.cmpCustcode = "",
    //this.userRole = "",
    this.jwtToken = "",
    this.refreshToken = "",
    this.isKycVerified = false,
  });

  Map<String, dynamic> toMap() {
    return {
      'name': name,
      'cmpCuststatus': cmpCuststatus,
      'cmpCustlastlogin': cmpCustlastlogin,
      'cmpCustcode': cmpCustcode,
      //'userRole': userRole.toMap(), // Assuming Role has a toMap method
      'jwtToken': jwtToken,
      'refreshToken': refreshToken,
      'isKycVerified': isKycVerified,
    };
  }

  factory AuthenticationResponse.fromMap(Map<String, dynamic> map) {
    return AuthenticationResponse(
      name: map['name'] ?? "",
      cmpCuststatus: map['cmpCuststatus'] ?? "",
      cmpCustlastlogin: map['cmpCustlastlogin'] ?? "",
      cmpCustcode: map['cmpCustcode'] ?? "",
      // userRole: Role.fromMap(map['userRole']), // Assuming Role has a fromMap method
      jwtToken: map['jwtToken'] ?? "",
      refreshToken: map['refreshToken'] ?? "",
      isKycVerified: map['isKycVerified'] ?? "",
    );
  }

  @override
  String toString() {
    return 'AuthenticationResponse{name: $name, cmpCuststatus: $cmpCuststatus, cmpCustlastlogin: $cmpCustlastlogin, cmpCustcode: $cmpCustcode, /*userRole: userRole,*/ jwtToken: $jwtToken, refreshToken: $refreshToken, isKycVerified: $isKycVerified}';
  }
}
