19 lines
571 B
Dart
19 lines
571 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|||
|
|
|
||
|
|
part 'update_record.freezed.dart';
|
||
|
|
part 'update_record.g.dart';
|
||
|
|
|
||
|
|
/// Mirrors `models.UpdateRecord` — an OS package update log entry.
|
||
|
|
@freezed
|
||
|
|
sealed class UpdateRecord with _$UpdateRecord {
|
||
|
|
const factory UpdateRecord({
|
||
|
|
@Default('') String id,
|
||
|
|
required DateTime timestamp,
|
||
|
|
required bool success,
|
||
|
|
@Default(<String>[]) List<String> packages,
|
||
|
|
@Default('') String message,
|
||
|
|
}) = _UpdateRecord;
|
||
|
|
|
||
|
|
factory UpdateRecord.fromJson(Map<String, dynamic> json) => _$UpdateRecordFromJson(json);
|
||
|
|
}
|