from sqlalchemy import ( Column, Integer, Text, LargeBinary, ) from sqlalchemy.orm import relationship from .meta import Base class Badge(Base): __tablename__ = 'badges' id = Column(Integer, primary_key=True) title = Column(Text) image = Column(LargeBinary) tracks = relationship('Track', secondary='track_badge_assoc', back_populates='badges')