Jisho-Study-Tool/lib/models/history/word_result.dart

25 lines
450 B
Dart
Raw Normal View History

2021-07-19 01:49:18 +02:00
import 'package:objectbox/objectbox.dart';
import 'package:jisho_study_tool/models/history/search_string.dart';
@Entity()
class WordResult {
int id = 0;
@Property(type: PropertyType.date)
DateTime timestamp;
String word;
final searchString = ToOne<SearchString>();
WordResult({
2021-07-26 21:39:17 +02:00
required this.timestamp,
required this.word,
2021-07-19 01:49:18 +02:00
});
@override
String toString() {
return "[${timestamp.toIso8601String()}] - $word";
}
}