Created
January 29, 2014 12:35
-
-
Save rayhaanj/8687012 to your computer and use it in GitHub Desktop.
models
This file contains 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 User(Base): | |
__tablename__ = 'users' | |
id = Column(Integer, primary_key=True) | |
username = Column(String(100), unique=True) | |
password = Column(String(100)) | |
firstName = Column(String(100)) | |
middleNames = Column(String(100)) | |
lastName = Column(String(100)) | |
email = Column(String(100), unique=True) | |
created = Column(DateTime) | |
roles = relationship('Role', secondary = UserRoles, backref = 'users') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment