prasule/lib/api/entry_data.dart
Matyáš Caras cfd4d6200e
chore: cosmetic changes
Change some comment text, also change current balance to a getter
2024-01-31 07:54:29 +01:00

26 lines
635 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'entry_data.g.dart';
/// Contains raw data
@JsonSerializable()
class EntryData {
/// Contains raw data
EntryData({required this.name, required this.amount, this.description = ""});
/// Connects the generated fromJson method
factory EntryData.fromJson(Map<String, dynamic> json) =>
_$EntryDataFromJson(json);
/// Name of entry
String name;
/// Optional description, default is empty
String description;
/// Amount for entry
double amount;
/// Connects the generated toJson method
Map<String, dynamic> toJson() => _$EntryDataToJson(this);
}