2024-06-30 20:25:36 +02:00
|
|
|
// SPDX-FileCopyrightText: (C) 2024 Matyáš Caras
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-09-08 11:50:21 +02:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
2024-01-08 21:19:15 +01:00
|
|
|
part of 'recurring_entry.dart';
|
2023-09-08 11:50:21 +02:00
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2024-01-08 21:19:15 +01:00
|
|
|
RecurringWalletEntry _$RecurringWalletEntryFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
RecurringWalletEntry(
|
2023-10-09 17:28:05 +02:00
|
|
|
data: EntryData.fromJson(json['data'] as Map<String, dynamic>),
|
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,
|
2024-01-08 21:19:15 +01:00
|
|
|
lastRunDate: DateTime.parse(json['lastRunDate'] as String),
|
|
|
|
repeatAfter: json['repeatAfter'] as int,
|
|
|
|
recurType: $enumDecode(_$RecurTypeEnumMap, json['recurType']),
|
2023-09-08 11:50:21 +02:00
|
|
|
);
|
|
|
|
|
2024-01-08 21:19:15 +01:00
|
|
|
Map<String, dynamic> _$RecurringWalletEntryToJson(
|
|
|
|
RecurringWalletEntry instance) =>
|
2023-09-08 11:50:21 +02:00
|
|
|
<String, dynamic>{
|
|
|
|
'type': _$EntryTypeEnumMap[instance.type]!,
|
2023-10-09 17:28:05 +02:00
|
|
|
'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,
|
2024-01-08 21:19:15 +01:00
|
|
|
'lastRunDate': instance.lastRunDate.toIso8601String(),
|
|
|
|
'repeatAfter': instance.repeatAfter,
|
|
|
|
'recurType': _$RecurTypeEnumMap[instance.recurType]!,
|
2023-09-08 11:50:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
const _$EntryTypeEnumMap = {
|
|
|
|
EntryType.expense: 'expense',
|
|
|
|
EntryType.income: 'income',
|
|
|
|
};
|
2024-01-08 21:19:15 +01:00
|
|
|
|
|
|
|
const _$RecurTypeEnumMap = {
|
|
|
|
RecurType.month: 'month',
|
|
|
|
RecurType.year: 'year',
|
|
|
|
RecurType.day: 'day',
|
|
|
|
};
|