initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user