Files
beige/backend/app/models
yangqianqian df1856d793 上线版: 产品表单统一+form嵌套修复+用户管理+部署+三套叙事
- 产品编辑入口统一走 ProductFormFull(卖点/风格/人群/品牌词全字段);
  修复开任务页 <form> 套 <form> 致"编辑产品"报错、改不了、跳回首个产品
- dashboard 入口卡片对齐实际路由: 系统管理(/config) 与 工作配置(/settings) 分开;
  settings ?tab=products 直达改用挂载后读 URL, 消除 hydration mismatch
- 新增用户管理(users API/admin service/改密页) + alembic 022/023/024
- 上线部署: Dockerfile / docker-compose.prod+https / nginx https / .env.example
- A8 三套正交叙事(痛点/场景/成分背书) + beige 调色去AI化 + 飞轮 text_import 高权重信号

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 18:08:13 +08:00
..

app/models/

SQLAlchemy ORM 模型占位Alembic 001-004 按顺序建:

Alembic 001 — 从banana搬3张改造

  • user.py # users删credits字段
  • login_record.py # login_records
  • user_preference.py # user_preferencesUI设置偏好

Alembic 002 — 多租户基础(全新)

  • workspace.py # workspaces
  • workspace_member.py # workspace_membersuser+workspace+角色)
  • user_api_key.py # user_api_keysFernet加密UNIQUE user_id+workspace_id+provider

Alembic 003 — 业务主体7张全新

  • product.py # products含text_angles/custom_prompt/source/workspace_id
  • benchmark_note.py # benchmark_notes
  • generation_task.py # generation_tasks状态机+审核字段平铺)
  • text_candidate.py # text_candidatessource=ai/import双轨
  • image_candidate.py # image_candidates
  • delivery_package.py # delivery_packages
  • banned_word.py # banned_words三级level

Alembic 004 — 飞轮(全新)

  • preference_event.py # preference_events含data_ownership字段

铁律

  • 所有业务表有 workspace_id 字段
  • generation_tasks 审核字段平铺review_status/reviewer_id/reviewed_at/reject_reason/approved_at/archived_at
  • preference_events.signal_weight 初始默认值:选文案+3/选图+3/通过+5/打回-3/重生成-1