Compare commits
No commits in common. "84df581763b6e8d9d0a50be31e1099ecff2264da" and "85d313d45b94f6b0577ec504a0f5b53dca20c1a6" have entirely different histories.
84df581763
...
85d313d45b
BIN
db/Model.mwb
BIN
db/Model.mwb
Binary file not shown.
@ -8,8 +8,8 @@ from .base import Base
|
|||||||
class BookCategoryLink(Base):
|
class BookCategoryLink(Base):
|
||||||
__tablename__ = 'book_category_link'
|
__tablename__ = 'book_category_link'
|
||||||
|
|
||||||
book_id = Column(Integer, ForeignKey('book.id', ondelete="cascade"), primary_key=True)
|
book_id = Column(Integer, ForeignKey('book.id'), primary_key=True)
|
||||||
book_category_id = Column(Integer, ForeignKey('book_category.id', ondelete="cascade"), primary_key=True)
|
book_category_id = Column(Integer, ForeignKey('book_category.id'), primary_key=True)
|
||||||
|
|
||||||
book = relationship('Book', overlaps='categories,books')
|
book = relationship('Book', overlaps='categories,books')
|
||||||
book_category = relationship('BookCategory', overlaps='categories,books')
|
book_category = relationship('BookCategory', overlaps='categories,books')
|
@ -19,7 +19,7 @@ class Member(Base):
|
|||||||
first_name = Column(String(50), nullable=False)
|
first_name = Column(String(50), nullable=False)
|
||||||
last_name = Column(String(50), nullable=False)
|
last_name = Column(String(50), nullable=False)
|
||||||
email = Column(String(100), nullable=False, unique=True)
|
email = Column(String(100), nullable=False, unique=True)
|
||||||
phone = Column(String(20), nullable=True, unique=True)
|
phone = Column(String(20), nullable=True)
|
||||||
register_date = Column(TIMESTAMP, nullable=True, server_default=func.now())
|
register_date = Column(TIMESTAMP, nullable=True, server_default=func.now())
|
||||||
status = Column(Enum(MemberStatusEnum), nullable=True, default=MemberStatusEnum.active)
|
status = Column(Enum(MemberStatusEnum), nullable=True, default=MemberStatusEnum.active)
|
||||||
last_updated = Column(TIMESTAMP, nullable=True)
|
last_updated = Column(TIMESTAMP, nullable=True)
|
Loading…
x
Reference in New Issue
Block a user