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")
|
2021-11-29 23:44:22 +00:00
|
|
|
final String? totalSize;
|
2021-02-02 14:33:23 +00:00
|
|
|
|
2021-11-29 23:44:22 +00:00
|
|
|
History({required this.items, required this.multipasteItems, this.totalSize});
|
2021-02-02 14:33:23 +00:00
|
|
|
|
|
|
|
// JSON Init
|
2021-11-29 23:44:22 +00:00
|
|
|
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);
|
|
|
|
}
|