// 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(),
      vendorsId: (json['vendors_id'] as num).toInt(),
      vendorName: json['vendor_name'] as String?,
      name: json['name'] as String,
      isDeleted: json['is_deleted'] as bool,
      registeredAt: DateTime.parse(json['registered_at'] as String),
      updatedAt: json['updated_at'] == null
          ? null
          : DateTime.parse(json['updated_at'] as String),
    );

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

_$ModelListDtoImpl _$$ModelListDtoImplFromJson(Map<String, dynamic> json) =>
    _$ModelListDtoImpl(
      items: (json['data'] as List<dynamic>)
          .map((e) => ModelDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      total: (json['total'] as num).toInt(),
      page: (json['page'] as num).toInt(),
      perPage: (json['page_size'] as num).toInt(),
      totalPages: (json['total_pages'] as num).toInt(),
    );

Map<String, dynamic> _$$ModelListDtoImplToJson(_$ModelListDtoImpl instance) =>
    <String, dynamic>{
      'data': instance.items,
      'total': instance.total,
      'page': instance.page,
      'page_size': instance.perPage,
      'total_pages': instance.totalPages,
    };

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

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

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

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