stack_wallet/lib/models/isar/models/log.dart
2023-05-27 00:21:16 +03:00

33 lines
780 B
Dart

/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
import 'package:isar/isar.dart';
// import 'package:stackwallet/models/isar/type_converters/log_level_converter.dart';
import 'package:stackwallet/utilities/enums/log_level_enum.dart';
part 'log.g.dart';
@Collection()
class Log {
Id id = Isar.autoIncrement;
late String message;
@Index()
late int timestampInMillisUTC;
@Enumerated(EnumType.name)
late LogLevel logLevel;
@override
String toString() {
return "[${logLevel.name}][${DateTime.fromMillisecondsSinceEpoch(timestampInMillisUTC, isUtc: true)}]: $message";
}
}