refactor: 移除提示词模板页面及相关接口,精简岗位/标签/用户提示词模型
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
838e986670
commit
e6662cf673
19 files changed
+55
-729
No files matched your search
+1
-14
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from datetime import UTC, datetime
|
||||
|
||||
from sqlalchemy import Boolean, Integer, String, Text
|
||||
from sqlalchemy import Integer, String, Text
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from deerflow.persistence.base import Base
|
||||
@@ -22,18 +22,5 @@ class UserCustomPromptRow(Base):
|
||||
# Optional association to a single agent. NULL = global (shown everywhere);
|
||||
# otherwise the prompt only surfaces when that agent is selected.
|
||||
agent_id: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
|
||||
# When True, this row is an admin-maintained **template** (not a user's own
|
||||
# prompt). Templates are tag-targeted (via TagAssignmentRow,
|
||||
# target_type='user_prompt') and cloned into a user's prompts by the 岗位
|
||||
# sync engine. ``user_id`` of a template holds the admin's id (audit only).
|
||||
is_template: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False, server_default="0", index=True)
|
||||
# Source of a non-template row: ``"user"`` (created by the user) or
|
||||
# ``"position"`` (cloned from a template by the sync engine). Sync only
|
||||
# touches ``"position"`` rows.
|
||||
origin: Mapped[str] = mapped_column(String(16), nullable=False, default="user", server_default="user")
|
||||
# For ``origin='position'`` clones: the template this row was cloned from
|
||||
# (so re-sync can reconcile by template id) and the granting position.
|
||||
template_id: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
|
||||
position_id: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
|
||||
created_at: Mapped[datetime] = mapped_column(BeijingDateTime(), nullable=False, default=lambda: datetime.now(UTC))
|
||||
updated_at: Mapped[datetime] = mapped_column(BeijingDateTime(), nullable=False, default=lambda: datetime.now(UTC), onupdate=lambda: datetime.now(UTC))
|
||||
Reference in new issue
Block a user