Files
DMZJ_F/lib/models/db/local_favorite.dart
2026-03-07 17:24:59 +08:00

40 lines
659 B
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:get/get.dart';
import 'package:hive/hive.dart';
part 'local_favorite.g.dart';
@HiveType(typeId: 6)
class LocalFavorite {
LocalFavorite({
required this.id,
required this.objId,
required this.title,
required this.cover,
required this.type,
required this.updateTime,
});
@HiveField(0)
String id;
String get hiveId => "${type}_$objId";
@HiveField(1)
int objId;
@HiveField(2)
String title;
@HiveField(3)
String cover;
/// 类型对应app_constant漫画或小说
@HiveField(4)
int type;
@HiveField(5)
DateTime updateTime;
//是否被选中
Rx<bool> isChecked = false.obs;
}