class DepositAccount {
  String porOrgacode = "";
  String mbmBkmsnumber = "";
  String pcrCurrdesc = "";
  String pctCstycode = "";
  String mbmBkmstitle = "";
  double mbmBkmsbalance = 0.0;
  String mbmBkmsopendate = "";
  String accountType = "";
  String transactionLimit = "";
  String dmpProddesc = "";
  String plcLocadesc = "";
  String pcrCurrcode = "";
  String cmpCustcode = "";
  String dmpProdcode = "";
  String plcLocacode = "";
  String padAdrsmobphone = "";
  String pasAcstcode = "";
  String pcrCurrshort = "";


  DepositAccount({
    this.porOrgacode = "",
    this.mbmBkmsnumber = "",
    this.pcrCurrdesc = "",
    this.pctCstycode = "",
    this.mbmBkmstitle = "",
    this.mbmBkmsbalance = 0.0,
    this.mbmBkmsopendate = "",
    this.accountType = "",
    this.transactionLimit = "",
    this.dmpProddesc = "",
    this.plcLocadesc = "",
    this.pcrCurrcode = "",
    this.cmpCustcode = "",
    this.dmpProdcode = "",
    this.plcLocacode = "",
    this.padAdrsmobphone = "",
    this.pasAcstcode = "",
    this.pcrCurrshort = "",
  });

  DepositAccount.empty()
      : this.porOrgacode = "",
        this.mbmBkmsnumber = "",
        this.pcrCurrdesc = "",
        this.pctCstycode = "",
        this.mbmBkmstitle = "",
        this.mbmBkmsbalance = 0.0,
        this.mbmBkmsopendate = "",
        this.accountType = "",
        this.transactionLimit = "",
        this.dmpProddesc = "",
        this.plcLocadesc = "",
        this.pcrCurrcode = "",
        this.cmpCustcode = "",
        this.dmpProdcode = "",
        this.plcLocacode = "",
        this.padAdrsmobphone = "",
        this.pasAcstcode = "",
        this.pcrCurrshort = "";

  factory DepositAccount.fromMap(Map<String, dynamic> map) {
    return DepositAccount(
      porOrgacode: map['porOrgacode'] ?? "",
      mbmBkmsnumber: map['mbmBkmsnumber'] ?? "",
      pcrCurrdesc: map['pcrCurrdesc'] ?? "",
      pctCstycode: map['pctCstycode'] ?? "",
      mbmBkmstitle: map['mbmBkmstitle'] ?? "",
      mbmBkmsbalance: (map['mbmBkmsbalance'] ?? 0.0).toDouble(),
      mbmBkmsopendate: map['mbmBkmsopendate'] ?? "",
      accountType: map['accountType'] ?? "",
      transactionLimit: map['transactionLimit'] ?? "",
      dmpProddesc: map['dmpProddesc'] ?? "",
      plcLocadesc: map['plcLocadesc'] ?? "",
      pcrCurrcode: map['pcrCurrcode'] ?? "",
      cmpCustcode: map['cmpCustcode'] ?? "",
      dmpProdcode: map['dmpProdcode'] ?? "",
      plcLocacode: map['plcLocacode'] ?? "",
      padAdrsmobphone: map['padAdrsmobphone'] ?? "",
      pasAcstcode: map['pasAcstcode'] ?? "",
      pcrCurrshort: map['pcrCurrshort'] ?? "",
    );
  }

  Map<String, dynamic> toMap() {
    final Map<String, dynamic> data = {
      'porOrgacode': porOrgacode,
      'mbmBkmsnumber': mbmBkmsnumber,
      'pcrCurrdesc': pcrCurrdesc,
      'pctCstycode': pctCstycode,
      'mbmBkmstitle': mbmBkmstitle,
      'mbmBkmsbalance': mbmBkmsbalance,
      'mbmBkmsopendate': mbmBkmsopendate,
      'accountType': accountType,
      'transactionLimit': transactionLimit,
      'dmpProddesc': dmpProddesc,
      'plcLocadesc': plcLocadesc,
      'pcrCurrcode': pcrCurrcode,
      'cmpCustcode': cmpCustcode,
      'dmpProdcode': dmpProdcode,
      'plcLocacode': plcLocacode,
      'padAdrsmobphone': padAdrsmobphone,
      'pasAcstcode': pasAcstcode,
      'pcrCurrshort': pcrCurrshort,
    };
    return data;
  }

  DepositAccount copyWith({
    String? porOrgacode,
    String? mbmBkmsnumber,
    String? pcrCurrdesc,
    String? pcrCurrCode,
    String? pctCstycode,
    String? mbmBkmstitle,
    double? mbmBkmsbalance,
    String? mbmBkmsopendate,
    String? accountType,
    String? transactionLimit,
    String? dmpProddesc,
    String? plcLocadesc,
    String? pcrCurrcode,
    String? cmpCustcode,
    String? dmpProdcode,
    String? plcLocacode,
    String? padAdrsmobphone,
    String? pasAcstcode,
    String? pcrCurrshort,
  }) {
    return DepositAccount(
      porOrgacode: porOrgacode ?? this.porOrgacode,
      mbmBkmsnumber: mbmBkmsnumber ?? this.mbmBkmsnumber,
      pcrCurrdesc: pcrCurrdesc ?? this.pcrCurrdesc,
      pctCstycode: pctCstycode ?? this.pctCstycode,
      mbmBkmstitle: mbmBkmstitle ?? this.mbmBkmstitle,
      mbmBkmsbalance: mbmBkmsbalance ?? this.mbmBkmsbalance,
      mbmBkmsopendate: mbmBkmsopendate ?? this.mbmBkmsopendate,
      accountType: accountType ?? this.accountType,
      transactionLimit: transactionLimit ?? this.transactionLimit,
      dmpProddesc: dmpProddesc ?? this.dmpProddesc,
      plcLocadesc: plcLocadesc ?? this.plcLocadesc,
      pcrCurrcode: pcrCurrcode ?? this.pcrCurrcode,
      cmpCustcode: cmpCustcode ?? this.cmpCustcode,
      dmpProdcode: dmpProdcode ?? this.dmpProdcode,
      plcLocacode: plcLocacode ?? this.plcLocacode,
      padAdrsmobphone: padAdrsmobphone ?? this.padAdrsmobphone,
      pasAcstcode: pasAcstcode ?? this.pasAcstcode,
      pcrCurrshort: pcrCurrshort ?? this.pcrCurrshort,
    );
  }
}
