2021-02-02 14:33:23 +00:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
|
|
|
|
part 'history_item.g.dart';
|
|
|
|
|
|
|
|
@JsonSerializable()
|
|
|
|
class HistoryItem {
|
|
|
|
@JsonKey(required: true)
|
|
|
|
final String id;
|
|
|
|
final String date;
|
|
|
|
final String filename;
|
|
|
|
final String filesize;
|
|
|
|
final String hash;
|
|
|
|
final String mimetype;
|
2021-11-29 23:44:22 +00:00
|
|
|
final String? thumbnail;
|
2021-02-02 14:33:23 +00:00
|
|
|
|
2021-11-29 23:44:22 +00:00
|
|
|
HistoryItem(
|
|
|
|
{required this.date,
|
|
|
|
required this.filename,
|
|
|
|
required this.filesize,
|
|
|
|
required this.hash,
|
|
|
|
required this.id,
|
|
|
|
required this.mimetype,
|
|
|
|
this.thumbnail});
|
2021-02-02 14:33:23 +00:00
|
|
|
|
|
|
|
// JSON Init
|
2022-06-22 22:44:08 +00:00
|
|
|
factory HistoryItem.fromJson(Map<String, dynamic> json) => _$HistoryItemFromJson(json);
|
2021-02-02 14:33:23 +00:00
|
|
|
|
|
|
|
// JSON Export
|
|
|
|
Map<String, dynamic> toJson() => _$HistoryItemToJson(this);
|
|
|
|
}
|