improve: add setting button to pathnode
This commit is contained in:
@@ -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': [
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user