Skip to content

feat(dart): 新增 quanttide_finance — DTO、Journal 模型与测试#12

Open
linli2004 wants to merge 1 commit into
quanttide:mainfrom
linli2004:finance-task/t2-dart
Open

feat(dart): 新增 quanttide_finance — DTO、Journal 模型与测试#12
linli2004 wants to merge 1 commit into
quanttide:mainfrom
linli2004:finance-task/t2-dart

Conversation

@linli2004

@linli2004 linli2004 commented Jun 16, 2026

Copy link
Copy Markdown

做了什么

新增完整 Dart 包,包含 DTO 层(SourceRecord/NormalizedRecord/ClassificationResult)、Journal 模型(Journal/JournalEntry/JournalEntryLine)、46 个单元测试。

⚠️ 完整包新增,共 33 个源文件,超出 20 文件限制,特此说明。

测试验证

dart analyze

Analyzing dart...
No issues found!

dart test (46/46 All tests passed)

00:00 +0: test/dto/normalized_record_test.dart: NormalizedRecordDto toJson uses snake_case keys
00:00 +1: test/dto/classification_result_test.dart: ClassificationResultDto fromJson round-trip
00:00 +2: test/dto/source_record_test.dart: SourceRecordDto toJson uses snake_case keys
00:00 +3: test/dto/source_record_test.dart: SourceRecordDto toJson uses snake_case keys
00:00 +4: test/dto/source_record_test.dart: SourceRecordDto fromJson round-trip
00:00 +5: test/dto/enums_test.dart: SourceType wire values
00:00 +6: test/dto/enums_test.dart: Direction wire values
00:00 +7: test/models/journal_test.dart: Journal toJson / fromJson
00:00 +46: All tests passed!

文件变更

DTO 模型 10 + Journal 模型 6 + 测试 5 + 配置 9

… and tests

Complete Dart library package with:
- DTO layer: SourceRecord, NormalizedRecord, ClassificationResult with enums
- Journal models: Journal, JournalEntry with freezed equality and JSON serialization
- Comprehensive test coverage for all models and DTOs

Note: 30 source files for a complete package addition exceeds the 20-file
guideline. This is a special case — a single package cannot be split without
breaking its integrity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant