c1ce109f13
- 新增 OrderRecord 模型 (user_id, platform, store_name, dishes, order_date, price, original_price, savings) - 新增 order_record schema (OrderRecordOut + OrderListResponse) - 新增 CRUD: get_records_page 按 order_date DESC 分页查询 - 新增 /api/v1/user/records 路由, 需 Bearer token 鉴权, 支持 page/size 参数 - Alembic 迁移: add order_record table - platform 支持: meituan_waimai / taobao_shanguang / jd_waimai / meituan / taobao / jd - dishes 字段 DB 存 JSON 字符串, 接口返回 list[str] Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 lines
197 B
Python
4 lines
197 B
Python
"""所有 ORM model 必须在这里 import 一次,Alembic / metadata 才能扫到。"""
|
|
from app.models.user import User # noqa: F401
|
|
from app.models.order_record import OrderRecord # noqa: F401
|