📊 数据持久化阶段完成: - 完成4个数据模型的Hive集成(Book, Bookshelf, Bookmark, Highlight) - 实现4个Repository数据访问层 - 生成5个TypeAdapter自动序列化文件 - 完成所有模型的CRUD操作和测试验证 📚 项目文档更新: - 新增数据持久化阶段完成总结文档 - 更新CLAUDE.md项目主文档 - 完善项目结构说明和开发进度 🚀 UI开发阶段规划: - 定义产品定位:类似微信读书的Material Design电子书阅读器 - 制定4阶段开发计划:UI基础架构→顶部导航→首页内容→数据集成 - 明确页面结构:底部Tab导航(首页/书库/统计/我的) - 规划核心功能:搜索、导入、最近阅读、摘录列表 🎯 下一里程碑: - 开始UI基础架构搭建 - 实现底部Tab导航和Material Design主题系统 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
69 lines
1.8 KiB
Dart
69 lines
1.8 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'bookmark.dart';
|
|
|
|
// **************************************************************************
|
|
// TypeAdapterGenerator
|
|
// **************************************************************************
|
|
|
|
class BookmarkAdapter extends TypeAdapter<Bookmark> {
|
|
@override
|
|
final int typeId = 5;
|
|
|
|
@override
|
|
Bookmark read(BinaryReader reader) {
|
|
final numOfFields = reader.readByte();
|
|
final fields = <int, dynamic>{
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
};
|
|
return Bookmark(
|
|
id: fields[0] as String,
|
|
bookId: fields[1] as String,
|
|
chapterId: fields[2] as String?,
|
|
title: fields[3] as String,
|
|
description: fields[4] as String?,
|
|
pageIndex: fields[5] as int,
|
|
position: fields[6] as double,
|
|
previewText: fields[7] as String?,
|
|
createdTime: fields[8] as DateTime,
|
|
sortOrder: fields[9] as int,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void write(BinaryWriter writer, Bookmark obj) {
|
|
writer
|
|
..writeByte(10)
|
|
..writeByte(0)
|
|
..write(obj.id)
|
|
..writeByte(1)
|
|
..write(obj.bookId)
|
|
..writeByte(2)
|
|
..write(obj.chapterId)
|
|
..writeByte(3)
|
|
..write(obj.title)
|
|
..writeByte(4)
|
|
..write(obj.description)
|
|
..writeByte(5)
|
|
..write(obj.pageIndex)
|
|
..writeByte(6)
|
|
..write(obj.position)
|
|
..writeByte(7)
|
|
..write(obj.previewText)
|
|
..writeByte(8)
|
|
..write(obj.createdTime)
|
|
..writeByte(9)
|
|
..write(obj.sortOrder);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is BookmarkAdapter &&
|
|
runtimeType == other.runtimeType &&
|
|
typeId == other.typeId;
|
|
}
|