Created
April 8, 2015 13:03
-
-
Save thequbit/4ab60a1dc9a73a22e8e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customers(Base): | |
__tablename__ = 'customers' | |
id = Column(Integer, primary_key=True) | |
name = Column(Unicode) | |
description = Column(Unicode) | |
class Accounts(Base): | |
__tablename__ = 'accounts' | |
id = Column(Integer, primary_key=True) | |
customer_id = Column(Integer, ForeignKey('customers.id')) | |
name = Column(Unicode) | |
description = Column(Unicode) | |
class Contacts(Base): | |
__tablename__ = 'contacts' | |
id = Column(Integer, primary_key=True) | |
customer_id = Column(Integer, ForeignKey('customers.id')) | |
first = Column(Unicode) | |
last = Column(Unicode) | |
email = Column(Unicode) | |
office_phone = Column(Unicode) | |
mobile_phone = Column(Unicode) | |
fax = Column(Unicode) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment