引入二级大纲功能,新增父子节点关系及子节点排序,同时调整API与UI以支持嵌套大纲管理
This commit is contained in:
@@ -39,10 +39,11 @@ class ChatMessage(SQLModel, table=True):
|
||||
created_at: datetime = Field(default_factory=_now_utc)
|
||||
|
||||
class Outline(SQLModel, table=True):
|
||||
"""大纲表,属于小说的子资源"""
|
||||
"""大纲表,属于小说的子资源,支持两级结构(父+子)"""
|
||||
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
novel_id: int = Field(foreign_key="novel.id", index=True)
|
||||
parent_id: int | None = Field(default=None, foreign_key="outline.id", index=True)
|
||||
sort_order: int = Field(default=0)
|
||||
summary: str = Field(max_length=200)
|
||||
detail: str = Field(default="", max_length=1000)
|
||||
|
||||
Reference in New Issue
Block a user