52 lines
1.8 KiB
Dart
52 lines
1.8 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'vendor_dto.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$VendorDtoImpl _$$VendorDtoImplFromJson(Map<String, dynamic> json) =>
|
|
_$VendorDtoImpl(
|
|
id: (json['id'] as num?)?.toInt(),
|
|
name: json['name'] as String,
|
|
isDeleted: json['is_deleted'] as bool? ?? false,
|
|
createdAt: 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),
|
|
);
|
|
|
|
Map<String, dynamic> _$$VendorDtoImplToJson(_$VendorDtoImpl instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'name': instance.name,
|
|
'is_deleted': instance.isDeleted,
|
|
'registered_at': instance.createdAt?.toIso8601String(),
|
|
'updated_at': instance.updatedAt?.toIso8601String(),
|
|
};
|
|
|
|
_$VendorListResponseImpl _$$VendorListResponseImplFromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$VendorListResponseImpl(
|
|
items: (json['data'] as List<dynamic>)
|
|
.map((e) => VendorDto.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['page_size'] as num?)?.toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$VendorListResponseImplToJson(
|
|
_$VendorListResponseImpl instance) =>
|
|
<String, dynamic>{
|
|
'data': instance.items,
|
|
'total': instance.totalCount,
|
|
'page': instance.currentPage,
|
|
'total_pages': instance.totalPages,
|
|
'page_size': instance.pageSize,
|
|
};
|