Commit Graph

18 Commits

Author SHA1 Message Date
Misaka_Company
a6873ae2ee fix: resolve YAML config path relative to project root
Ensure config/settings.yaml can be found when running from any working
directory by resolving the path relative to the settings.py file location
rather than the current working directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:40:46 +08:00
Misaka_Company
8292de7747 refactor: update database.py to use new config module
Update import statement from app.core.config to config.settings as part
of YAML configuration migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:37:52 +08:00
Misaka_Company
2f73dd07b5 test: add configuration loading tests
- Add test_config.py with tests for load_settings function
- Add test_config.yaml fixture with test database configuration
- Tests cover: successful loading, file not found error, database URL generation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:36:30 +08:00
Misaka_Company
7478b7176f feat: add YAML configuration module with pydantic-yaml
- Created config directory with settings.py, __init__.py, and settings.yaml
- Implemented SqlServerConfig and DatabaseConfig classes for SQL Server connections
- Added Settings class with database_url property for SQLAlchemy URL construction
- Uses parse_yaml_raw_as for UTF-8 safe YAML loading on Windows
- Configuration validated successfully via import test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:35:03 +08:00
Misaka_Company
33fee72e3f deps: add pydantic-yaml for YAML configuration support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:32:53 +08:00
Misaka_Company
71d261af26 docs: add YAML configuration implementation plan
Add detailed step-by-step implementation plan for migrating
from .env to YAML configuration using pydantic-yaml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:26:26 +08:00
Misaka_Company
01423ccccc docs: add YAML configuration design document
Add design document for migrating from .env to YAML configuration
using pydantic-yaml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 09:25:46 +08:00
Misaka_Company
c370ca36bc feat: add boxing module API — GET /box/info and POST /box
- Add box schemas (BoxInfoResponse, BoxSaveRequest, BoxSaveResponse)
- Add box service with ERP view query and save logic (supports many2one append)
- Add box router with GET /box/info and POST /box endpoints
- Register exception handlers for InvalidZongpaiError, ZongpaiNotFoundError, DuplicateBoxItemError
- Update RequestValidationError handler to cover INVALID_BOX_NO and INVALID_QUANTITY
- Add 7 integration tests for box API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 18:04:13 +08:00
Misaka_Company
6e0e9d9584 chore: add .claude/ to gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 13:09:15 +08:00
Misaka_Company
6b722323ec docs: add implementation plans for shelf registration and 409 fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 13:08:05 +08:00
Misaka_Company
e9bb9d6be0 fix: unify error response format with error_code, message and domain fields
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 12:38:37 +08:00
Misaka_Company
6a4ea34e24 test: add integration tests for location API
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 11:16:33 +08:00
Misaka_Company
d68d602411 feat: add POST /CargoTrace/location endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 11:12:33 +08:00
Misaka_Company
e352d6dc18 feat: add location registration service
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 11:09:38 +08:00
Misaka_Company
7a3cc42798 feat: add pydantic schemas for location API
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 11:06:00 +08:00
Misaka_Company
e203008866 feat: add ORM models for finished goods tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 11:02:24 +08:00
Misaka_Company
0e7950d4c7 feat: add project config and database connection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-11 10:59:57 +08:00
Misaka_Company
2cc476b314 Initial commit: Setup FastAPI project structure 2026-05-11 09:44:34 +08:00