Files
beige/backend/app/models/fission.py
yangqianqian 6a2632da70 baseline: Clover 独立仓库首次基线提交
将 Clover 从上层产品包旧仓库中独立出来,建立专属版本控制。
当前状态=纵切片端到端已打通(登录→选品→出文出图→审核→下载包),
M1文案质量去套路化已验收。此提交作为后续按核销清单逐条修复的基线。

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

54 lines
1.7 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
app/models/fission.py — fission_tasks
Alembic 010 第11环裂变引擎1爆款→N套完整笔记包
reference_level: low/mid/high参考程度
status: pending/generating/done/failed
"""
from datetime import datetime
from sqlalchemy import (
BigInteger, DateTime, ForeignKey,
Index, Integer, String, Text, func,
)
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class FissionTask(Base):
"""裂变任务1爆款→N套完整笔记包第11环在工作台内呈现。"""
__tablename__ = "fission_tasks"
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
workspace_id: Mapped[int] = mapped_column(
BigInteger, ForeignKey("workspaces.id", ondelete="CASCADE"), nullable=False
)
# 爆款源笔记内容(文案+图描述JSON存储
source_note: Mapped[str | None] = mapped_column(
Text, comment="爆款源笔记内容(文案+图描述JSON存储"
)
# 参考程度low/mid/high
reference_level: Mapped[str] = mapped_column(
String(10), default="mid", nullable=False,
comment="参考程度: low/mid/high"
)
# 裂变套数默认3套
fanout_count: Mapped[int] = mapped_column(
Integer, default=3, nullable=False,
comment="裂变套数默认3套"
)
# 状态机
status: Mapped[str] = mapped_column(
String(20), default="pending", nullable=False,
comment="状态: pending/generating/done/failed"
)
created_at: Mapped[datetime] = mapped_column(
DateTime, server_default=func.now(), nullable=False
)
__table_args__ = (
Index("idx_fission_tasks_workspace_id", "workspace_id"),
)