Commit Graph

12 Commits

Author SHA1 Message Date
c17511d2e8 修复模型定义 2025-12-26 19:29:29 +08:00
5835b4c626 Add HTTP exception helpers and update models
Introduced utils/http/http_exceptions.py with common HTTP exception helpers for FastAPI. Updated main.py to use a global exception handler that logs and hides internal errors. Refined models/README.md to document new models and relationships, including PhysicalFile and UploadSession, and updated DTO and enum documentation. Simplified ThemeResponse in models/color.py. Improved models/download.py with type annotations, index changes, and import optimizations. Fixed a parameter type in clean.py.

Co-Authored-By: 砂糖橘 <54745033+Foxerine@users.noreply.github.com>
2025-12-25 15:48:21 +08:00
96bf447426 feat: 为多个模型的外键字段添加级联删除和其他约束 2025-12-23 11:00:09 +08:00
a5efda9c23 feat(mixin): add TableBaseMixin and UUIDTableBaseMixin for async CRUD operations
- Implemented TableBaseMixin providing generic CRUD methods and automatic timestamp management.
- Introduced UUIDTableBaseMixin for models using UUID as primary keys.
- Added ListResponse for standardized paginated responses.
- Created TimeFilterRequest and PaginationRequest for filtering and pagination parameters.
- Enhanced get_with_count method to return both item list and total count.
- Included validation for time filter parameters in TimeFilterRequest.
- Improved documentation and usage examples throughout the code.
2025-12-22 18:29:14 +08:00
922692b820 feat: 更新模型以支持 UUID,添加注册请求 DTO,重构用户注册逻辑 2025-12-19 16:32:49 +08:00
b364b740ca feat: Enhance models and README with additional features and improvements
- Updated README to include KodBox in project vision.
- Added model descriptions for clarity in Download, File, Folder, Group, Node, Order, Policy, Redeem, Report, Request, Response, Setting, Share, SourceLink, StoragePack, Tag, Task, User, and WebDAV.
- Changed optional fields from Optional[...] to the new union type syntax (e.g., str | None).
- Improved foreign key references in models for consistency.
- Refactored relationships in models to use singular forms where appropriate.
- Updated login service to reflect changes in request model types.
2025-11-27 21:22:40 +08:00
1533d9e89c Refactor code structure for improved readability and maintainability 2025-11-27 20:56:48 +08:00
0d45a07ba7 优化数据库模型与关系 2025-09-27 22:40:10 +08:00
cf5539f3c2 重构模型基类 2025-09-26 06:18:59 +08:00
4148e362b9 数据库时间日志迁移至 BaseModel 2025-07-18 00:50:19 +08:00
652a78cb05 数据库优化 2025-07-01 00:16:07 +08:00
f6825b670f 数据库创建 2025-06-22 19:26:23 +08:00