// GENERATED CODE - DO NOT MODIFY BY HAND part of 'contribution_model.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** ContributionModel _$ContributionModelFromJson(Map json) => ContributionModel( id: json['id'] as String?, membreId: json['membreId'] as String, membreNom: json['membreNom'] as String?, membrePrenom: json['membrePrenom'] as String?, organisationId: json['organisationId'] as String?, organisationNom: json['organisationNom'] as String?, type: $enumDecodeNullable(_$ContributionTypeEnumMap, json['type']) ?? ContributionType.annuelle, statut: $enumDecodeNullable(_$ContributionStatusEnumMap, json['statut']) ?? ContributionStatus.nonPayee, montant: (json['montant'] as num).toDouble(), montantPaye: (json['montantPaye'] as num?)?.toDouble(), devise: json['devise'] as String? ?? 'XOF', dateEcheance: DateTime.parse(json['dateEcheance'] as String), datePaiement: json['datePaiement'] == null ? null : DateTime.parse(json['datePaiement'] as String), dateRappel: json['dateRappel'] == null ? null : DateTime.parse(json['dateRappel'] as String), methodePaiement: $enumDecodeNullable(_$PaymentMethodEnumMap, json['methodePaiement']), numeroPaiement: json['numeroPaiement'] as String?, referencePaiement: json['referencePaiement'] as String?, annee: (json['annee'] as num).toInt(), mois: (json['mois'] as num?)?.toInt(), trimestre: (json['trimestre'] as num?)?.toInt(), semestre: (json['semestre'] as num?)?.toInt(), description: json['description'] as String?, notes: json['notes'] as String?, recu: json['recu'] as String?, dateCreation: json['dateCreation'] == null ? null : DateTime.parse(json['dateCreation'] as String), dateModification: json['dateModification'] == null ? null : DateTime.parse(json['dateModification'] as String), creeParId: json['creeParId'] as String?, modifieParId: json['modifieParId'] as String?, ); Map _$ContributionModelToJson(ContributionModel instance) => { 'id': instance.id, 'membreId': instance.membreId, 'membreNom': instance.membreNom, 'membrePrenom': instance.membrePrenom, 'organisationId': instance.organisationId, 'organisationNom': instance.organisationNom, 'type': _$ContributionTypeEnumMap[instance.type]!, 'statut': _$ContributionStatusEnumMap[instance.statut]!, 'montant': instance.montant, 'montantPaye': instance.montantPaye, 'devise': instance.devise, 'dateEcheance': instance.dateEcheance.toIso8601String(), 'datePaiement': instance.datePaiement?.toIso8601String(), 'dateRappel': instance.dateRappel?.toIso8601String(), 'methodePaiement': _$PaymentMethodEnumMap[instance.methodePaiement], 'numeroPaiement': instance.numeroPaiement, 'referencePaiement': instance.referencePaiement, 'annee': instance.annee, 'mois': instance.mois, 'trimestre': instance.trimestre, 'semestre': instance.semestre, 'description': instance.description, 'notes': instance.notes, 'recu': instance.recu, 'dateCreation': instance.dateCreation?.toIso8601String(), 'dateModification': instance.dateModification?.toIso8601String(), 'creeParId': instance.creeParId, 'modifieParId': instance.modifieParId, }; const _$ContributionTypeEnumMap = { ContributionType.annuelle: 'ANNUELLE', ContributionType.mensuelle: 'MENSUELLE', ContributionType.trimestrielle: 'TRIMESTRIELLE', ContributionType.semestrielle: 'SEMESTRIELLE', ContributionType.exceptionnelle: 'EXCEPTIONNELLE', }; const _$ContributionStatusEnumMap = { ContributionStatus.payee: 'PAYEE', ContributionStatus.nonPayee: 'NON_PAYEE', ContributionStatus.enRetard: 'EN_RETARD', ContributionStatus.partielle: 'PARTIELLE', ContributionStatus.annulee: 'ANNULEE', }; const _$PaymentMethodEnumMap = { PaymentMethod.especes: 'ESPECES', PaymentMethod.cheque: 'CHEQUE', PaymentMethod.virement: 'VIREMENT', PaymentMethod.carteBancaire: 'CARTE_BANCAIRE', PaymentMethod.waveMoney: 'WAVE_MONEY', PaymentMethod.orangeMoney: 'ORANGE_MONEY', PaymentMethod.freeMoney: 'FREE_MONEY', PaymentMethod.mobileMoney: 'MOBILE_MONEY', PaymentMethod.autre: 'AUTRE', };