Last active
November 13, 2019 12:30
-
-
Save okomarov/c6bc358e36a5d5b81cdbe2c3bfde5205 to your computer and use it in GitHub Desktop.
Viral queue user model
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 User(BaseModel, db.Model): | |
__tablename__ = 'user' | |
id = db.Column(db.Integer, primary_key=True) | |
email = db.Column(db.String(120), unique=True, nullable=False) | |
email_confirmed = db.Column(db.Boolean, default=False) | |
email_confirmed_on = db.Column(db.DateTime(timezone=True)) | |
waitlist = db.relationship('Waitlist', uselist=False, back_populates='user') | |
def __init__(self, email): | |
self.email = email |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment