// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'organization_model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

OrganizationModel _$OrganizationModelFromJson(Map<String, dynamic> json) =>
    OrganizationModel(
      id: json['id'] as String?,
      nom: json['nom'] as String,
      nomCourt: json['nomCourt'] as String?,
      typeOrganisation: json['typeOrganisation'] as String? ?? 'ASSOCIATION',
      statut:
          $enumDecodeNullable(_$StatutOrganizationEnumMap, json['statut']) ??
          StatutOrganization.active,
      description: json['description'] as String?,
      dateFondation: json['dateFondation'] == null
          ? null
          : DateTime.parse(json['dateFondation'] as String),
      numeroEnregistrement: json['numeroEnregistrement'] as String?,
      email: json['email'] as String?,
      telephone: json['telephone'] as String?,
      telephoneSecondaire: json['telephoneSecondaire'] as String?,
      emailSecondaire: json['emailSecondaire'] as String?,
      siteWeb: json['siteWeb'] as String?,
      reseauxSociaux: json['reseauxSociaux'] as String?,
      adresse: json['adresse'] as String?,
      ville: json['ville'] as String?,
      codePostal: json['codePostal'] as String?,
      region: json['region'] as String?,
      pays: json['pays'] as String?,
      logo: json['logo'] as String?,
      nombreMembres: (json['nombreMembres'] as num?)?.toInt() ?? 0,
      nombreAdministrateurs:
          (json['nombreAdministrateurs'] as num?)?.toInt() ?? 0,
      nombreEvenements: (json['nombreEvenements'] as num?)?.toInt(),
      budgetAnnuel: (json['budgetAnnuel'] as num?)?.toDouble(),
      devise: json['devise'] as String? ?? 'XOF',
      cotisationObligatoire: json['cotisationObligatoire'] as bool? ?? false,
      montantCotisationAnnuelle: (json['montantCotisationAnnuelle'] as num?)
          ?.toDouble(),
      objectifs: json['objectifs'] as String?,
      activitesPrincipales: json['activitesPrincipales'] as String?,
      certifications: json['certifications'] as String?,
      partenaires: json['partenaires'] as String?,
      notes: json['notes'] as String?,
      typeOrganisationLibelle: json['typeOrganisationLibelle'] as String?,
      statutLibelle: json['statutLibelle'] as String?,
      organisationPublique: json['organisationPublique'] as bool? ?? true,
      accepteNouveauxMembres: json['accepteNouveauxMembres'] as bool? ?? true,
      dateCreation: json['dateCreation'] == null
          ? null
          : DateTime.parse(json['dateCreation'] as String),
      dateModification: json['dateModification'] == null
          ? null
          : DateTime.parse(json['dateModification'] as String),
      actif: json['actif'] as bool? ?? true,
    );

Map<String, dynamic> _$OrganizationModelToJson(OrganizationModel instance) =>
    <String, dynamic>{
      'id': instance.id,
      'nom': instance.nom,
      'nomCourt': instance.nomCourt,
      'typeOrganisation': instance.typeOrganisation,
      'statut': _$StatutOrganizationEnumMap[instance.statut]!,
      'description': instance.description,
      'dateFondation': instance.dateFondation?.toIso8601String(),
      'numeroEnregistrement': instance.numeroEnregistrement,
      'email': instance.email,
      'telephone': instance.telephone,
      'telephoneSecondaire': instance.telephoneSecondaire,
      'emailSecondaire': instance.emailSecondaire,
      'siteWeb': instance.siteWeb,
      'reseauxSociaux': instance.reseauxSociaux,
      'adresse': instance.adresse,
      'ville': instance.ville,
      'codePostal': instance.codePostal,
      'region': instance.region,
      'pays': instance.pays,
      'logo': instance.logo,
      'nombreMembres': instance.nombreMembres,
      'nombreAdministrateurs': instance.nombreAdministrateurs,
      'nombreEvenements': instance.nombreEvenements,
      'budgetAnnuel': instance.budgetAnnuel,
      'devise': instance.devise,
      'cotisationObligatoire': instance.cotisationObligatoire,
      'montantCotisationAnnuelle': instance.montantCotisationAnnuelle,
      'objectifs': instance.objectifs,
      'activitesPrincipales': instance.activitesPrincipales,
      'certifications': instance.certifications,
      'partenaires': instance.partenaires,
      'notes': instance.notes,
      'typeOrganisationLibelle': instance.typeOrganisationLibelle,
      'statutLibelle': instance.statutLibelle,
      'organisationPublique': instance.organisationPublique,
      'accepteNouveauxMembres': instance.accepteNouveauxMembres,
      'dateCreation': instance.dateCreation?.toIso8601String(),
      'dateModification': instance.dateModification?.toIso8601String(),
      'actif': instance.actif,
    };

const _$StatutOrganizationEnumMap = {
  StatutOrganization.active: 'ACTIVE',
  StatutOrganization.inactive: 'INACTIVE',
  StatutOrganization.suspendue: 'SUSPENDUE',
  StatutOrganization.dissoute: 'DISSOUTE',
  StatutOrganization.enCreation: 'EN_CREATION',
};
