38 lines
552 B
Dart
38 lines
552 B
Dart
import 'package:hive/hive.dart';
|
|
|
|
part 'task_item.g.dart';
|
|
|
|
@HiveType(typeId: 0)
|
|
class TaskItem extends HiveObject {
|
|
@HiveField(0)
|
|
String id;
|
|
|
|
@HiveField(1)
|
|
String title;
|
|
|
|
@HiveField(2)
|
|
String? subtitle;
|
|
|
|
@HiveField(3)
|
|
String? notes;
|
|
|
|
@HiveField(4)
|
|
bool isCompleted;
|
|
|
|
@HiveField(5)
|
|
DateTime createdAt;
|
|
|
|
@HiveField(6)
|
|
int sortIndex;
|
|
|
|
TaskItem({
|
|
required this.id,
|
|
required this.title,
|
|
this.subtitle,
|
|
this.notes,
|
|
this.isCompleted = false,
|
|
required this.createdAt,
|
|
required this.sortIndex,
|
|
});
|
|
}
|