-
-
Save flamingo0208/d888a2ca03a426a231de172599ec11b4 to your computer and use it in GitHub Desktop.
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
UserStatusType = create_named_tuple( | |
'Active', 'Disabled') | |
class Users(db.Model): | |
__tablename__ = 'users' | |
id = db.Column(db.Integer, primary_key=True, autoincrement=True) | |
login_id = db.Column(db.String(64), unique=True, nullable=False) | |
account_id = db.Column(db.String(32), nullable=False) | |
status = db.Column(db.Enum(*UserStatusType._asdict().values(), name='status_type')) | |
project_id = db.Column(db.Integer, db.ForeignKey('projects.id', ondelete='RESTRICT')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment