improve: add setting button to pathnode

This commit is contained in:
h z
2025-03-20 18:37:13 +00:00
parent e7000f0b2e
commit 6626fac452
3 changed files with 10 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ class Markdown(Base):
path_id = Column(Integer, ForeignKey('path.id'), nullable=False)
order = Column(String(36), default=lambda: str(uuid.uuid4()))
shortcut = Column(String(36), default="")
template_id = Column(Integer, ForeignKey("markdown_template.id"), nullable=True)
setting_id = Column(Integer, ForeignKey("markdown_setting.id"), nullable=True)
__table_args__ = (UniqueConstraint('path_id', 'title', name="unique_path_id_title"),)
def to_dict(self):
return {
@@ -24,7 +24,7 @@ class Markdown(Base):
'path_id': self.path_id,
'order': self.order,
'shortcut': self.shortcut,
'template_id': self.template_id,
'setting_id': self.setting_id,
}
__payload__ = {
'dev': [

View File

@@ -4,7 +4,7 @@ from db.models import Base
class MarkdownSetting(Base):
__tablename__ = 'markdown_settings'
__tablename__ = 'markdown_setting'
id = Column(Integer, primary_key=True, autoincrement=True)
template_setting_id = Column(Integer, ForeignKey('markdown_template.id'), nullable=True)