Erweiterungen
This commit is contained in:
1 parent
88dc13391d
commit
75787d51ff
6 files changed
+731
-5
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'log_entry.g.dart';
|
||||
|
||||
enum LogEntrySeverityEnum {
|
||||
info,
|
||||
debug,
|
||||
error
|
||||
}
|
||||
|
||||
@collection
|
||||
@JsonSerializable()
|
||||
class LogEntry {
|
||||
late Id id = Isar.autoIncrement;
|
||||
|
||||
late DateTime time;
|
||||
|
||||
@enumerated
|
||||
late LogEntrySeverityEnum severity;
|
||||
|
||||
late String text;
|
||||
|
||||
LogEntry();
|
||||
|
||||
Map<String, dynamic> toJson() => _$LogEntryToJson(this);
|
||||
}
|
||||
Reference in new issue
Block a user