class WithdrawMethod {
  WithdrawMethod({
    this.withdrawMethodId,
    this.name,
    this.email,
    this.method,
    this.userId,
  });

  final String? withdrawMethodId;
  final String? name;
  final String? email;
  final String? method;
  final String? userId;

  static const String fieldWithdrawMethodId = 'withdrawMethodId';
  static const String fieldName = 'name';
  static const String fieldEmail = 'email';
  static const String fieldMethod = 'method';
  static const String fieldUserId = 'userId';

  factory WithdrawMethod.fromJson(Map<String, dynamic> json) {
    return WithdrawMethod(
      withdrawMethodId: json[fieldWithdrawMethodId],
      name: json[fieldName],
      email: json[fieldEmail],
      method: json[fieldMethod],
      userId: json[fieldUserId],
    );
  }

  Map<String, dynamic> toMap() {
    return {
      fieldWithdrawMethodId: withdrawMethodId,
      fieldName: name,
      fieldEmail: email,
      fieldMethod: method,
      fieldUserId: userId,
    };
  }

  WithdrawMethod copyWith({
    String? withdrawMethodId,
    String? name,
    String? email,
    String? method,
    String? userId,
  }) {
    return WithdrawMethod(
      withdrawMethodId: withdrawMethodId ?? this.withdrawMethodId,
      name: name ?? this.name,
      email: email ?? this.email,
      method: method ?? this.method,
      userId: userId ?? this.userId,
    );
  }
}
