fix: template defects
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#db/models/Log.py
|
||||
from sqlalchemy import Column, Integer, String, DateTime, Text
|
||||
from db.models import Base
|
||||
import datetime
|
||||
|
||||
@@ -6,7 +6,7 @@ from db.models import Base
|
||||
class MarkdownSetting(Base):
|
||||
__tablename__ = 'markdown_setting'
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
template_setting_id = Column(Integer, ForeignKey('markdown_template.id'), nullable=True)
|
||||
template_setting_id = Column(Integer, ForeignKey('markdown_template_setting.id'), nullable=True)
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from sqlalchemy import Column, Text, Integer, String, UniqueConstraint
|
||||
from sqlalchemy import Column, Text, Integer, String, UniqueConstraint,JSON
|
||||
from db.models import Base
|
||||
|
||||
class MarkdownTemplate(Base):
|
||||
__tablename__ = 'markdown_template'
|
||||
id = Column(Integer, primary_key=True)
|
||||
title = Column(String(255), nullable=False)
|
||||
parameters = Column(Text, nullable=True)
|
||||
parameters = Column(JSON, nullable=True)
|
||||
layout = Column(Text, nullable=True)
|
||||
__table_args__ = (UniqueConstraint("title", name="unique_title"),)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user