You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uco-mobile-poc/lib/app/models/evaluated_cuency_model.dart

63 lines
1.9 KiB
Dart

class EvaluatedCurrencyModel {
String pcrCurrcode = "";
double sgtGntramtfc = 0.0;
double serviceCharges = 0.0;
double targetPerEratrateact = 0.0;
EvaluatedCurrencyModel({
this.pcrCurrcode = "",
this.sgtGntramtfc = 0.0,
this.serviceCharges = 0.0,
this.targetPerEratrateact = 0.0,
});
EvaluatedCurrencyModel.empty()
: this.pcrCurrcode = "",
this.sgtGntramtfc = 0.0,
this.serviceCharges = 0.0,
this.targetPerEratrateact = 0.0;
Map<String, dynamic> toMap() {
return {
'pcrCurrcode': this.pcrCurrcode,
'sgtGntramtfc': this.sgtGntramtfc,
'serviceCharges': this.serviceCharges,
'targetPerEratrateact': this.targetPerEratrateact,
};
}
factory EvaluatedCurrencyModel.fromMap(Map<String, dynamic> map) {
return EvaluatedCurrencyModel(
pcrCurrcode: map['pcrCurrcode'] ?? "",
sgtGntramtfc: map['sgtGntramtfc'] ?? 0.0,
serviceCharges: map['serviceCharges'] ?? 0.0,
targetPerEratrateact: map['targetPerEratrateact'] ?? 0.0,
);
}
@override
String toString() {
return 'EvaluatedCurrencyModel{pcrCurrcode: $pcrCurrcode, sgtGntramtfc: $sgtGntramtfc, serviceCharges: $serviceCharges, targetPerEratrateact: $targetPerEratrateact}';
}
// Factory constructor to create an instance from a JSON map
// factory EvaluatedCurrencyModel.fromJson(Map<String, dynamic> json) {
// return EvaluatedCurrencyModel(
// pcrCurrcode: json['pcrCurrcode'] as String,
// sgtGntramtfc: (json['sgtGntramtfc'] as num).toDouble(),
// serviceCharges: (json['serviceCharges'] as num).toDouble(),
// targetPerEratrateact: (json['targetPerEratrateact'] as num).toDouble(),
// );
// }
//
// // Method to convert an instance to a JSON map
// Map<String, dynamic> toJson() {
// return {
// 'pcrCurrcode': pcrCurrcode,
// 'sgtGntramtfc': sgtGntramtfc,
// 'serviceCharges': serviceCharges,
// 'targetPerEratrateact': targetPerEratrateact,
// };
// }
}