// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'company_list_dto.dart';

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

_$CompanyListDtoImpl _$$CompanyListDtoImplFromJson(Map<String, dynamic> json) =>
    _$CompanyListDtoImpl(
      id: (json['id'] as num).toInt(),
      name: json['name'] as String,
      address: json['address'] as String,
      contactName: json['contact_name'] as String?,
      contactPhone: json['contact_phone'] as String?,
      contactEmail: json['contact_email'] as String?,
      isActive: json['is_active'] as bool,
      createdAt: json['created_at'] == null
          ? null
          : DateTime.parse(json['created_at'] as String),
      branchCount: (json['branch_count'] as num?)?.toInt() ?? 0,
    );

Map<String, dynamic> _$$CompanyListDtoImplToJson(
        _$CompanyListDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'address': instance.address,
      'contact_name': instance.contactName,
      'contact_phone': instance.contactPhone,
      'contact_email': instance.contactEmail,
      'is_active': instance.isActive,
      'created_at': instance.createdAt?.toIso8601String(),
      'branch_count': instance.branchCount,
    };

_$CompanyWithBranchesImpl _$$CompanyWithBranchesImplFromJson(
        Map<String, dynamic> json) =>
    _$CompanyWithBranchesImpl(
      company:
          CompanyResponse.fromJson(json['company'] as Map<String, dynamic>),
      branches: (json['branches'] as List<dynamic>?)
              ?.map((e) => BranchListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          const [],
    );

Map<String, dynamic> _$$CompanyWithBranchesImplToJson(
        _$CompanyWithBranchesImpl instance) =>
    <String, dynamic>{
      'company': instance.company,
      'branches': instance.branches,
    };
