后端: - 添加 position_x, position_y 字段保存节点位置 前端: - 支持从节点右侧圆点拖拽出箭头连接到其他课程 - 自动根据节点Y坐标识别所属阶段 - 保存并恢复节点位置,不再重置 - 阶段区域高亮显示 - 循环依赖检测 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -86,6 +86,14 @@ class GrowthPathNode(BaseModel, SoftDeleteMixin):
|
||||
estimated_days: Mapped[int] = mapped_column(
|
||||
Integer, default=7, nullable=False, comment="预计学习天数"
|
||||
)
|
||||
|
||||
# 画布位置(用于可视化编辑器)
|
||||
position_x: Mapped[Optional[int]] = mapped_column(
|
||||
Integer, nullable=True, default=0, comment="画布X坐标"
|
||||
)
|
||||
position_y: Mapped[Optional[int]] = mapped_column(
|
||||
Integer, nullable=True, default=0, comment="画布Y坐标"
|
||||
)
|
||||
|
||||
# 关联关系
|
||||
growth_path: Mapped["GrowthPath"] = relationship( # noqa: F821
|
||||
|
||||
Reference in New Issue
Block a user