86 lines
3.2 KiB
Dart
86 lines
3.2 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'rent_dto.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$RentDtoImpl _$$RentDtoImplFromJson(Map<String, dynamic> json) =>
|
|
_$RentDtoImpl(
|
|
id: (json['id'] as num?)?.toInt(),
|
|
startedAt: DateTime.parse(json['started_at'] as String),
|
|
endedAt: DateTime.parse(json['ended_at'] as String),
|
|
equipmentHistoryId: (json['equipment_history_Id'] as num).toInt(),
|
|
equipmentHistory: json['equipmentHistory'] == null
|
|
? null
|
|
: EquipmentHistoryDto.fromJson(
|
|
json['equipmentHistory'] as Map<String, dynamic>),
|
|
);
|
|
|
|
Map<String, dynamic> _$$RentDtoImplToJson(_$RentDtoImpl instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'started_at': instance.startedAt.toIso8601String(),
|
|
'ended_at': instance.endedAt.toIso8601String(),
|
|
'equipment_history_Id': instance.equipmentHistoryId,
|
|
'equipmentHistory': instance.equipmentHistory,
|
|
};
|
|
|
|
_$RentRequestDtoImpl _$$RentRequestDtoImplFromJson(Map<String, dynamic> json) =>
|
|
_$RentRequestDtoImpl(
|
|
startedAt: DateTime.parse(json['started_at'] as String),
|
|
endedAt: DateTime.parse(json['ended_at'] as String),
|
|
equipmentHistoryId: (json['equipment_history_Id'] as num).toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$RentRequestDtoImplToJson(
|
|
_$RentRequestDtoImpl instance) =>
|
|
<String, dynamic>{
|
|
'started_at': instance.startedAt.toIso8601String(),
|
|
'ended_at': instance.endedAt.toIso8601String(),
|
|
'equipment_history_Id': instance.equipmentHistoryId,
|
|
};
|
|
|
|
_$RentUpdateRequestDtoImpl _$$RentUpdateRequestDtoImplFromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$RentUpdateRequestDtoImpl(
|
|
startedAt: json['started_at'] == null
|
|
? null
|
|
: DateTime.parse(json['started_at'] as String),
|
|
endedAt: json['ended_at'] == null
|
|
? null
|
|
: DateTime.parse(json['ended_at'] as String),
|
|
equipmentHistoryId: (json['equipment_history_Id'] as num?)?.toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$RentUpdateRequestDtoImplToJson(
|
|
_$RentUpdateRequestDtoImpl instance) =>
|
|
<String, dynamic>{
|
|
'started_at': instance.startedAt?.toIso8601String(),
|
|
'ended_at': instance.endedAt?.toIso8601String(),
|
|
'equipment_history_Id': instance.equipmentHistoryId,
|
|
};
|
|
|
|
_$RentListResponseImpl _$$RentListResponseImplFromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$RentListResponseImpl(
|
|
items: (json['data'] as List<dynamic>)
|
|
.map((e) => RentDto.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> _$$RentListResponseImplToJson(
|
|
_$RentListResponseImpl instance) =>
|
|
<String, dynamic>{
|
|
'data': instance.items,
|
|
'total': instance.totalCount,
|
|
'page': instance.currentPage,
|
|
'total_pages': instance.totalPages,
|
|
'page_size': instance.pageSize,
|
|
};
|