Commit Graph

2 Commits

Author SHA1 Message Date
Pine f1147dced3 feat(pay): 微信支付V3子应用与算力充值
- app/pay 独立支付子应用(config/wxpay/models/repository/service/routers),便于后期拆分微服务
- 充值订单表 0026_compute_recharge;套餐支持折扣(discount)与上架开关(enabled),DB system_configs 优先、env 兜底
- 统一小程序支付:桌面端出小程序码→扫码进小程序确认页按 openid 发起 JSAPI→回调幂等到账(引擎 adjust_user_quota+镜像回写)
- 内嵌 wechatpayv3(含 async_),响应验签失败降级告警;新增 aiofiles 依赖

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-30 22:29:44 +08:00
Pine 8b0bca36a1 feat(db): P1 Alembic+模型整合 — 唯一总库基线迁移 + 培训/园区 ORM 模型
- 新增 alembic(ini/env async/script.mako/versions/0001_initial)。
- models.py 并入培训表(training_accounts/events/bookings/tests/courses/policy/plan/survey_logs)
  与园区表(park_tenants/companies/kb_docs/screens),与平台同库、命名加域前缀避免撞名。
- baseline 迁移用 create_all(幂等):既有平台表保留,新增培训/园区表被建。
- 验证:对临时库 uv run alembic upgrade head 建出全部新表。
2026-08-24 19:28:18 +08:00