import '../../domain/entities/otp_response.dart';

class OtpResponseModel extends OtpResponse {
  const OtpResponseModel({
    required super.timeStamp,
    required super.timeDue,
    required super.phoneNumber,
  });

  factory OtpResponseModel.fromJson(Map<String, dynamic> json) {
    return OtpResponseModel(
      timeStamp: json['timestamp']?.toString() ?? '',
      timeDue: json['due']?.toString() ?? '',
      phoneNumber: json['phoneNumber']?.toString() ?? '',
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'timestamp': timeStamp,
      'due': timeDue,
      'phoneNumber': phoneNumber,
    };
  }
}
