class ExchangeRate {
  String petExrtdesc = "";
  String pcrCurrcode = "";
  double perEratrateact = 0.0;
  String petExrtcode = "";
  String perEratdate = "";
  String pcrCurrshort = "";
  String porOrgacode = "";
  String pcrCurrdesc = "";
  bool pcrCurrbase = false;

  ExchangeRate({
    this.petExrtdesc = "",
    this.pcrCurrcode = "",
    this.perEratrateact = 0.0,
    this.petExrtcode = "",
    this.perEratdate = "",
    this.pcrCurrshort = "",
    this.porOrgacode = "",
    this.pcrCurrdesc = "",
    this.pcrCurrbase = false,
  });

  ExchangeRate.empty()
      : this.petExrtdesc = "",
        this.pcrCurrcode = "",
        this.perEratrateact = 0.0,
        this.petExrtcode = "",
        this.perEratdate = "",
        this.pcrCurrshort = "",
        this.porOrgacode = "",
        this.pcrCurrdesc = "",
        this.pcrCurrbase = false;

  factory ExchangeRate.fromMap(Map<String, dynamic> json) {
    return ExchangeRate(
      petExrtdesc: json['petExrtdesc'] ?? "",
      pcrCurrcode: json['pcrCurrcode'] ?? "",
      perEratrateact: json['perEratrateact'] ?? 0.0,
      petExrtcode: json['petExrtcode'] ?? "",
      perEratdate: json['perEratdate'] ?? "",
      pcrCurrshort: json['pcrCurrshort'] ?? "",
      porOrgacode: json['porOrgacode'] ?? "",
      pcrCurrdesc: json['pcrCurrdesc'] ?? "",
      pcrCurrbase: json['pcrCurrbase'] ?? false,
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'petExrtdesc': petExrtdesc,
      'pcrCurrcode': pcrCurrcode,
      'perEratrateact': perEratrateact,
      'petExrtcode': petExrtcode,
      'perEratdate': perEratdate,
      'pcrCurrshort': pcrCurrshort,
      'porOrgacode': porOrgacode,
      'pcrCurrdesc': pcrCurrdesc,
      'pcrCurrbase': pcrCurrbase,
    };
  }

  @override
  String toString() {
    return 'ExchangeRate{petExrtdesc: $petExrtdesc, pcrCurrcode: $pcrCurrcode, perEratrateact: $perEratrateact, petExrtcode: $petExrtcode, perEratdate: $perEratdate, pcrCurrshort: $pcrCurrshort, porOrgacode: $porOrgacode, pcrCurrdesc: $pcrCurrdesc, pcrCurrbase: $pcrCurrbase}';
  }
}
