models.py 410 B

12345678910111213141516
  1. # coding: utf-8
  2. from sqlalchemy import Column, String
  3. from sqlalchemy.dialects.mysql import INTEGER
  4. from sqlalchemy.ext.declarative import declarative_base
  5. Base = declarative_base()
  6. metadata = Base.metadata
  7. class DbKafka(Base):
  8. __tablename__ = 'db_kafka'
  9. id = Column(INTEGER(11), primary_key=True)
  10. name = Column(String(200), nullable=False)
  11. json_str = Column(String(5000), nullable=False)