some fixes for models

This commit is contained in:
2021-08-19 18:33:39 +03:00
parent 0cb0b85bce
commit 94518adcc5
10 changed files with 31 additions and 38 deletions

View File

@@ -9,10 +9,10 @@ from orm.base import Base
class Proposal(Base):
__tablename__ = 'proposal'
author_id: str = Column(ForeignKey("user.id"), nullable=False, comment="Author")
author_id: int = Column(Integer, ForeignKey("user.id"), nullable=False, comment="Author")
body: str = Column(String, nullable=False, comment="Body")
createdAt: str = Column(datetime, nullable=False, comment="Created at")
shout: str = Column(ForeignKey("shout.id"), nullable=False, comment="Updated at")
shout: str = Column(String, ForeignKey("shout.slug"), nullable=False, comment="Updated at")
range: str = Column(String, nullable=True, comment="Range in format <start index>:<end>")
# TODO: debug, logix