38 lines
535 B
Dart
38 lines
535 B
Dart
import 'package:objectbox/objectbox.dart';
|
|
import 'package:stadtbote/model/tour_task.dart';
|
|
|
|
import '../tools/util.dart';
|
|
|
|
@Entity()
|
|
class TaskInfo {
|
|
@Id()
|
|
int id = 0;
|
|
|
|
late int sId;
|
|
|
|
String? additionalText;
|
|
|
|
String? answer;
|
|
|
|
late bool completed;
|
|
|
|
@Transient()
|
|
TourTask? task;
|
|
|
|
TaskInfo();
|
|
|
|
static Future<int> getNextId() async {
|
|
int taskInfoId = Util.preferencesGetInt('task_info_id', 0) as int;
|
|
|
|
taskInfoId += 1;
|
|
|
|
Util.preferencesSaveInt("task_info_id", taskInfoId);
|
|
|
|
return taskInfoId;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|