This commit is contained in:
2021-12-05 23:54:17 +03:00
parent 7d75480217
commit bf4df89bad
3 changed files with 26 additions and 58 deletions

View File

@@ -11,7 +11,7 @@ class Message(Base):
__tablename__ = 'message'
fromUser: int = Column(ForeignKey("user.id"), nullable=False, comment="Sender")
chatRoom: int = Column(Integer, nullable=false, comment="Chatroom")
chatRoom: int = Column(Integer, nullable=False, comment="Chatroom")
body: str = Column(String, nullable=False, comment="Body")
createdAt = Column(DateTime, nullable=False, default = datetime.now, comment="Created at")
updatedAt = Column(DateTime, nullable=True, comment="Updated at")