fbmobile/lib/core/models/rest/history.dart

27 lines
665 B
Dart
Raw Normal View History

2021-02-02 14:33:23 +00:00
import 'package:json_annotation/json_annotation.dart';
import 'history_item.dart';
import 'history_multipaste_item.dart';
part 'history.g.dart';
@JsonSerializable()
class History {
@JsonKey(name: "items")
final Map<String, HistoryItem> items;
@JsonKey(name: "multipaste_items")
final Map<String, HistoryMultipasteItem> multipasteItems;
@JsonKey(name: "total_size")
final String? totalSize;
2021-02-02 14:33:23 +00:00
History({required this.items, required this.multipasteItems, this.totalSize});
2021-02-02 14:33:23 +00:00
// JSON Init
factory History.fromJson(Map<String, dynamic> json) => _$HistoryFromJson(json);
2021-02-02 14:33:23 +00:00
// JSON Export
Map<String, dynamic> toJson() => _$HistoryToJson(this);
}