Skip to content

Instantly share code, notes, and snippets.

@thequbit
Created April 8, 2015 13:36
Show Gist options
  • Save thequbit/d3582ed8ac0cd21c4810 to your computer and use it in GitHub Desktop.
Save thequbit/d3582ed8ac0cd21c4810 to your computer and use it in GitHub Desktop.
class Customers(Base):
__tablename__ = 'customers'
id = Column(Integer, primary_key=True)
name = Column(Unicode)
description = Column(Unicode)
accounts = references('Accounts')
comments = references('comments', backref='customers')
class Comments(Base):
__tablename__ = 'comments'
id = Column(Integer, primary_key=True)
contents = Column(Unicode)
customer_id = Column(Integer, ForeignKey('customers.id'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment