// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'model_dto.dart';

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

_$ModelDtoImpl _$$ModelDtoImplFromJson(Map<String, dynamic> json) =>
    _$ModelDtoImpl(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String,
      vendorsId: (json['vendors_id'] as num).toInt(),
      isDeleted: json['is_deleted'] as bool? ?? false,
      registeredAt: json['registered_at'] == null
          ? null
          : DateTime.parse(json['registered_at'] as String),
      updatedAt: json['updated_at'] == null
          ? null
          : DateTime.parse(json['updated_at'] as String),
      vendorName: json['vendor_name'] as String?,
      vendor: json['vendor'] == null
          ? null
          : VendorDto.fromJson(json['vendor'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$$ModelDtoImplToJson(_$ModelDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'vendors_id': instance.vendorsId,
      'is_deleted': instance.isDeleted,
      'registered_at': instance.registeredAt?.toIso8601String(),
      'updated_at': instance.updatedAt?.toIso8601String(),
      'vendor_name': instance.vendorName,
      'vendor': instance.vendor,
    };

_$ModelRequestDtoImpl _$$ModelRequestDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$ModelRequestDtoImpl(
      name: json['name'] as String,
      vendorsId: (json['vendors_id'] as num).toInt(),
    );

Map<String, dynamic> _$$ModelRequestDtoImplToJson(
        _$ModelRequestDtoImpl instance) =>
    <String, dynamic>{
      'name': instance.name,
      'vendors_id': instance.vendorsId,
    };

_$ModelUpdateRequestDtoImpl _$$ModelUpdateRequestDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$ModelUpdateRequestDtoImpl(
      name: json['name'] as String?,
      vendorsId: (json['vendors_id'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$ModelUpdateRequestDtoImplToJson(
        _$ModelUpdateRequestDtoImpl instance) =>
    <String, dynamic>{
      'name': instance.name,
      'vendors_id': instance.vendorsId,
    };

_$ModelListResponseImpl _$$ModelListResponseImplFromJson(
        Map<String, dynamic> json) =>
    _$ModelListResponseImpl(
      items: (json['items'] as List<dynamic>)
          .map((e) => ModelDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      totalCount: (json['total'] as num).toInt(),
      currentPage: (json['page'] as num).toInt(),
      totalPages: (json['total_pages'] as num).toInt(),
      pageSize: (json['per_page'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$ModelListResponseImplToJson(
        _$ModelListResponseImpl instance) =>
    <String, dynamic>{
      'items': instance.items,
      'total': instance.totalCount,
      'page': instance.currentPage,
      'total_pages': instance.totalPages,
      'per_page': instance.pageSize,
    };
