prasule/lib/api/recurring_entry.g.dart
2023-12-07 21:20:52 +01:00

41 lines
1.4 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'recurring_entry.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
RecurringEntry _$RecurringEntryFromJson(Map<String, dynamic> json) =>
RecurringEntry(
data: EntryData.fromJson(json['data'] as Map<String, dynamic>),
type: $enumDecode(_$EntryTypeEnumMap, json['type']),
date: DateTime.parse(json['date'] as String),
category:
WalletCategory.fromJson(json['category'] as Map<String, dynamic>),
id: json['id'] as int,
recurringType: $enumDecode(_$RecurringTypeEnumMap, json['recurringType']),
recurEvery: json['recurEvery'] as int,
);
Map<String, dynamic> _$RecurringEntryToJson(RecurringEntry instance) =>
<String, dynamic>{
'type': _$EntryTypeEnumMap[instance.type]!,
'data': instance.data,
'date': instance.date.toIso8601String(),
'category': instance.category,
'id': instance.id,
'recurringType': _$RecurringTypeEnumMap[instance.recurringType]!,
'recurEvery': instance.recurEvery,
};
const _$EntryTypeEnumMap = {
EntryType.expense: 'expense',
EntryType.income: 'income',
};
const _$RecurringTypeEnumMap = {
RecurringType.byDay: 'byDay',
RecurringType.byMonth: 'byMonth',
RecurringType.byYear: 'byYear',
};