refactor: crud 并入 repositories + alembic 迁移文件去 hex 前缀
- 数据访问层统一: app/crud/{ad_reward,savings,signin,task,wallet}.py 移入
app/repositories/(与 user.py 同目录),删除 crud/;更新 10 处 import
(api/v1/* + scripts/* + repositories 内部交叉引用 app.crud→app.repositories)
- alembic/versions 9 个迁移文件去掉 hex 前缀,改成可读文件名(如
welfare_tables_coin_account_coin_txn.py);**仅重命名文件**,文件内
revision/down_revision 不动 → 迁移链与已迁移库的 alembic_version 不受影响
(alembic heads/history 验证链完好,单一 head c8d9e0f1a2b3)
- 测试: 37 passed(1 个 coupon 代理失败为连不到 pricebot 上游的环境问题,与本次无关)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ try:
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
|
||||
from app.crud import wallet as crud_wallet
|
||||
from app.repositories import wallet as crud_wallet
|
||||
from app.db.session import SessionLocal
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ from sqlalchemy import select # noqa: E402
|
||||
from app.integrations import pangle # noqa: E402
|
||||
from app.core.config import settings # noqa: E402
|
||||
from app.core.rewards import AD_REWARD_COIN # noqa: E402
|
||||
from app.crud import wallet as crud_wallet # noqa: E402
|
||||
from app.repositories import wallet as crud_wallet # noqa: E402
|
||||
from app.db.session import SessionLocal # noqa: E402
|
||||
from app.main import app # noqa: E402
|
||||
from app.models.user import User # noqa: E402
|
||||
|
||||
Reference in New Issue
Block a user