feat(fastapi): 新增 FastAPI 后端 — ORM、Schema、Router、Normalizer、测试#13
Open
linli2004 wants to merge 1 commit into
Open
feat(fastapi): 新增 FastAPI 后端 — ORM、Schema、Router、Normalizer、测试#13linli2004 wants to merge 1 commit into
linli2004 wants to merge 1 commit into
Conversation
… and tests Complete FastAPI backend package with: - SQLAlchemy ORM models (SourceRecord, NormalizedRecord, RecordLink, ClassificationResult) - Alembic migrations - Pydantic schemas for request/response validation - REST routers with CRUD endpoints - Business services: normalization, classification, statistics - Comprehensive test suite (database, routes, schemas, normalizers) Note: 38 source files for a complete backend package exceeds the 20-file guideline. This is a special case — a full package addition that cannot be split without breaking its integrity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什么
新增完整 FastAPI 后端包:SQLAlchemy ORM 模型(SourceRecord/NormalizedRecord/RecordLink/ClassificationResult)、Alembic 迁移、Pydantic schema、REST 路由、Normalizer 服务(CsvRowNormalizer/ManualNormalizer)、统计接口(Summary/Breakdown/Trend/Drilldown)、121 个测试。
测试验证
pytest (121 passed, 3.30s)
文件变更
迁移 5 + 模型 5 + Schema 6 + 路由 4 + 服务 5 + 测试 8 + 配置 3