keyword_with_content.py 562 B

12345678910111213
  1. from sqlalchemy import Column, Text, BigInteger, TIMESTAMP, VARCHAR
  2. from sqlalchemy.orm import declarative_base
  3. Base = declarative_base()
  4. class KeywordWithContent(Base):
  5. __tablename__ = "keyword_with_content"
  6. id = Column(BigInteger, primary_key=True, autoincrement=True, comment="主键id")
  7. keyword_id = Column(BigInteger, nullable=False, comment="关键词id")
  8. content_id = Column(BigInteger, nullable=False, comment="内容id")
  9. create_time = Column(TIMESTAMP, nullable=False, server_default="CURRENT_TIMESTAMP", comment="创建时间")