import 'dart:convert';

class ResendOtpUsendModel {
  String? porOrgacode;
  String? pctCstycode;
  String? channelCode;
  String? cmpCustcode;
  String? email;
  String? pinType;
  bool? isOtpRequired;
  String? transPincode;

  ResendOtpUsendModel({
    this.porOrgacode,
    this.pctCstycode,
    this.channelCode,
    this.cmpCustcode,
    this.email,
    this.pinType,
    this.isOtpRequired,
    this.transPincode,
  });

  Map<String, dynamic> toMap() {
    final result = <String, dynamic>{};

    if (porOrgacode != null) {
      result.addAll({'porOrgacode': porOrgacode});
    }
    if (pctCstycode != null) {
      result.addAll({'pctCstycode': pctCstycode});
    }
    if (channelCode != null) {
      result.addAll({'channelCode': channelCode});
    }
    if (cmpCustcode != null) {
      result.addAll({'cmpCustcode': cmpCustcode});
    }
    if (email != null) {
      result.addAll({'email': email});
    }
    if (pinType != null) {
      result.addAll({'pinType': pinType});
    }
    if (isOtpRequired != null) {
      result.addAll({'isOtpRequired': isOtpRequired});
    }
    if (transPincode != null) {
      result.addAll({'transPincode': transPincode});
    }
    return result;
  }

  factory ResendOtpUsendModel.fromMap(Map<String, dynamic> map) {
    return ResendOtpUsendModel(
      porOrgacode: map['porOrgacode'],
      pctCstycode: map['pctCstycode'],
      channelCode: map['channelCode'],
      cmpCustcode: map['cmpCustcode'],
      email: map['email'],
      pinType: map['pinType'],
      isOtpRequired: map['isOtpRequired'],
      transPincode:map['transPincode'],
    );
  }

  String toJson() => json.encode(toMap());

  factory ResendOtpUsendModel.fromJson(String source) =>
      ResendOtpUsendModel.fromMap(json.decode(source));
}
