fmt
This commit is contained in:
@@ -8,22 +8,22 @@ from orm.author import Author
|
||||
|
||||
|
||||
class CommunityAuthor(Base):
|
||||
__tablename__ = "community_author"
|
||||
__tablename__ = 'community_author'
|
||||
|
||||
id = None # type: ignore
|
||||
author = Column(ForeignKey("author.id"), primary_key=True)
|
||||
community = Column(ForeignKey("community.id"), primary_key=True)
|
||||
author = Column(ForeignKey('author.id'), primary_key=True)
|
||||
community = Column(ForeignKey('community.id'), primary_key=True)
|
||||
joined_at = Column(Integer, nullable=False, default=lambda: int(time.time()))
|
||||
role = Column(String, nullable=False)
|
||||
|
||||
|
||||
class Community(Base):
|
||||
__tablename__ = "community"
|
||||
__tablename__ = 'community'
|
||||
|
||||
name = Column(String, nullable=False)
|
||||
slug = Column(String, nullable=False, unique=True)
|
||||
desc = Column(String, nullable=False, default="")
|
||||
pic = Column(String, nullable=False, default="")
|
||||
desc = Column(String, nullable=False, default='')
|
||||
pic = Column(String, nullable=False, default='')
|
||||
created_at = Column(Integer, nullable=False, default=lambda: int(time.time()))
|
||||
|
||||
authors = relationship(Author, secondary="community_author")
|
||||
authors = relationship(Author, secondary='community_author')
|
||||
|
Reference in New Issue
Block a user