prasule/lib/api/multientry.g.dart

33 lines
1.1 KiB
Dart
Raw Normal View History

2023-09-08 11:50:21 +02:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'multientry.dart';
2023-09-08 11:50:21 +02:00
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
MultiEntry _$MultiEntryFromJson(Map<String, dynamic> json) => MultiEntry(
data: (json['data'] as List<dynamic>)
.map((e) => EntryData.fromJson(e as Map<String, dynamic>))
.toList(),
2023-09-08 11:50:21 +02:00
type: $enumDecode(_$EntryTypeEnumMap, json['type']),
date: DateTime.parse(json['date'] as String),
category:
WalletCategory.fromJson(json['category'] as Map<String, dynamic>),
2023-09-14 19:44:34 +02:00
id: json['id'] as int,
2023-09-08 11:50:21 +02:00
);
Map<String, dynamic> _$MultiEntryToJson(MultiEntry instance) =>
2023-09-08 11:50:21 +02:00
<String, dynamic>{
'type': _$EntryTypeEnumMap[instance.type]!,
'data': instance.data,
2023-09-08 11:50:21 +02:00
'date': instance.date.toIso8601String(),
'category': instance.category,
2023-09-14 19:44:34 +02:00
'id': instance.id,
2023-09-08 11:50:21 +02:00
};
const _$EntryTypeEnumMap = {
EntryType.expense: 'expense',
EntryType.income: 'income',
};