22 lines
723 B
Dart
22 lines
723 B
Dart
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||
|
import 'package:hive/hive.dart';
|
||
|
part 'habit_sammler.freezed.dart';
|
||
|
part 'habit_sammler_model.g.dart';
|
||
|
|
||
|
@freezed
|
||
|
@HiveType(typeId: 0)
|
||
|
class HabeichHabit with _$HabitHive {
|
||
|
const factory HabeichHabit({
|
||
|
@HiveField(0) required String name,
|
||
|
@HiveField(1) required String description,
|
||
|
@HiveField(2) required int icon,
|
||
|
@HiveField(3) required String frequency,
|
||
|
@HiveField(4) required int? goal,
|
||
|
@HiveField(5) required int streak,
|
||
|
@HiveField(6) required List<int> onlyOn,
|
||
|
@HiveField(7) required List<DateTime> doneOn,
|
||
|
@HiveField(8) required DateTime createdAt,
|
||
|
@HiveField(9) required DateTime updatedAt,
|
||
|
}) = _HabeichHabit;
|
||
|
}
|