Files
nj/app/lib/data/local/collections/journal_entry_collection.dart
iven 49d4aa36a7
Some checks failed
Main Merge / backend (push) Has been cancelled
Main Merge / frontend (push) Has been cancelled
fix(app): Phase 1.1 紧急修复 — SyncEngine 接入 + authorId + catch 异常处理
- feat(sync): SyncEngine 接入 EditorPage, 保存时 enqueue + 网络恢复自动 trySync
- fix(editor): authorId 从 AuthBloc 获取, 替代硬编码 'local'
- fix(bloc): class_bloc/calendar/profile/parent catch(_).全部改为 debugPrint
- feat(editor): 编辑器工具栏拆分 (brush_panel/tag_panel/text_format_bar/dot_grid_painter)
- feat(editor): EditorBloc 扩展 + EditorPage 增强
- feat(search): SearchBloc 扩展搜索功能
- feat(home): HomeBloc/HomePage 增强
- feat(auth): LoginPage 增强
- feat(templates): TemplateGalleryPage 重构
- fix(web): 管理端班级/日记页面修复
- fix(server): comment_service + theme_handler 修复
- docs: 添加全链路审计报告和验证截图
2026-06-02 21:21:43 +08:00

64 lines
1.3 KiB
Dart
Raw 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.
// 日记条目 Isar Collection — 本地持久化存储
//
// 与纯 Dart 模型 JournalEntry 分离,通过转换函数桥接。
// 业务 ID (String UUID) 作为索引字段Isar 主键用 autoIncrement。
import 'package:isar/isar.dart';
part 'journal_entry_collection.g.dart';
@collection
class JournalEntryCollection {
/// Isar 自增主键
Id isarId = Isar.autoIncrement;
/// 业务 UUID索引用于查找
@Index()
String id = '';
/// 作者 ID
String authorId = '';
/// 班级 ID可选
String? classId;
/// 日记标题
String title = '';
/// 日记日期epoch milliseconds
int dateEpoch = 0;
/// 心情enum → string
String mood = 'calm';
/// 天气enum → string
String weather = 'sunny';
/// 标签列表JSON String
String tagsJson = '[]';
/// 是否私密
bool isPrivate = true;
/// 是否分享到班级
bool sharedToClass = false;
/// 关联主题 ID可选
String? assignedTopicId;
/// 内容摘要(自动从文本元素提取)
String? contentExcerpt;
/// 版本号(乐观锁)
int version = 1;
/// 创建时间epoch milliseconds
int createdAtEpoch = 0;
/// 更新时间epoch milliseconds
int updatedAtEpoch = 0;
/// 软删除标记
bool isDeleted = false;
}